View Single Post
Old 15 July 2015, 17:57   #10
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,369
Again, just adding to this slightly old thread with another option: Use QLimit() instead of QWrap() - you give that min and max values and it gives the min value if the input is lower than the min, and the max value if the input is higher than the max. Bear in mind it only works on quick type variables so feeding it longs might give you strange results.

Also, for the modulo function there is Frac() which returns the fractional part of a number. QFrac() can be used if the input is a quick type, and will execute quicker.

A full version of the original Blitz Basic 2.1 manual is available here: http://www.amiblitz.de/content/blitz...mers/0001.html
Daedalus is offline  
 
Page generated in 0.04314 seconds with 10 queries