View Single Post
Old 26 March 2015, 21:34   #9
Cylon
Registered User
 
Join Date: Oct 2014
Location: Europe
Posts: 473
Quote:
Originally Posted by idrougge View Post
I think the ceiling function is accomplished using QWrap().
No, QWrap(in,min,max) does:

IF in => max THEN in=min

As in :

Code:
While NOT(JoyB(0))
   a=QWrap (a+1,1,20)
   Print a," "
   VWait 25
Wend

End
Will output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 2 3 4 5 ...

Furthermore, the difference in-max is added to min, if in exceeds max:

Code:
NPrint QWrap(35,1,20)
MouseWait
> 16

Last edited by Cylon; 28 March 2015 at 01:21. Reason: good.
Cylon is offline  
 
Page generated in 0.04399 seconds with 10 queries