- Home
·
- Math/Dates
·
- Shows how the built-in Mod operator works out the remainder of a number.
Shows how the built-in Mod operator works out the remainder of a number.
Shows how the built-in Mod operator works out the remainder of a number.
Rate Shows how the built-in Mod operator works out the remainder of a number.
(1(1 Vote))
'this function just shows how Mod works. The mod operator finds the remainder
'when you divide Num1 by Num2 using integer division. If Num2 goes exactly into Num1 then
'the result is zero.
'FACT: doing x mod (2^n) returns the value of the lower n bits of x
MyMod = num1 - ((num1 \ num2) * num2)
End Function
Shows how the built-in Mod operator works out the remainder of a number. Comments
No comments yet — be the first to post one!
Post a Comment