Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
A Little Challenge: Spin the Circle
#25
For i = start To fini Step Sgn(fini - start)

Start = 1: Fini = 90
SGN(90 - 1) = +1 'It's a positive number, so what we end up with is:

FOR i = 1 TO 90 STEP 1



Now, swap start and fini

Start = 90: Fini = 1
SGN (1 -90) = SGN (-89) = -1 it's a negative number, so we end up with:

FOR I = 90 TO 1 STEP -1



See the logic here?
Reply


Messages In This Thread
A Little Challenge: Spin the Circle - by NakedApe - 09-10-2024, 10:15 PM
RE: A Little Challenge: Spin the Circle - by Dav - 09-12-2024, 11:44 PM
RE: A Little Challenge: Spin the Circle - by SMcNeill - 09-13-2024, 12:47 AM



Users browsing this thread: 1 Guest(s)