Difference between revisions of "AMOSi:Mod"

From Amiga Coding
Jump to: navigation, search
m (1 revision(s))
 
(Extracted from the AMOSPro V2.00 helpfile)
(No difference)

Revision as of 02:45, 17 November 2007

MOD is a useful little function which allows you to cycle a variable through a repetitive series of values. It works by returning the remainder after a division.


r=v Mod d

This is equivalent to:


R=v - Int(v/d)*d