Forum Discussion
Jonathan_Hill
8 months agoSuper Hero
FREE: Perpetual Dial
Spinning out of my work on E-Learning Challenge #453, here's my early entry for Challenge #454, Using Variables.
Try it for yourself here. This demo uses Number, Text and True/False variab...
TerryThomas
Community Member
Hey Jonathan, very creative with the modular division! I haven't thought deeply about this question, i'll admit... but why does the code perform that mod division twice? What situation(s) comes up where the first one does not give you the answer you need, of 0-359 degress? (i can't open the story file at work, to see any comments or workings; long-story-short, we can't upgrade SL360 at the moment). thanx!
Jonathan_Hill
5 months agoSuper Hero
Thanks. I wrote this code with the help of Claude.ai, and looking back at my notes I can see I queried that at the time. 'The double modulo ensures that a number wraps around correctly within a specific range, handling both positive and negative inputs.'