Mod('Expression1','Expression2')
Description
This function returns the modulo of 'Expression1' and 'Expression2' as its result. Internally, the function uses the fmod C-function, which permits the use of floating-point values for 'Expression1' and 'Expression2'.
Modulo r is the remainder of the division Expression1 / Expression2 so that the following relationship applies in the opposite direction:
Expression1 = Expression2 * i + r, where i is an integer number (integer).
Modulo r always has the same sign as 'Expression1' and the absolute value of r is always smaller than the absolute value of 'Expression2'.
If Expression1' < 'Expression2', the function returns the value of 'Expression1' as its result. Mathematically speaking, the modulo can also be described as "Expression1 modulo Expression2".
Examples: Mod(7, 3) = 1; seven divided by three equals two, remainder 1.
Mod(20.0, 10.5) = 9.5
Example
Only the seconds from the time function are relevant; hours and minutes should be cut off
Solution
With the help of Modulo60 of the time function, only the seconds are kept as the remainder.
In the figure below the blue curve shows the time function and the green curve shows Modulo60 of the time function.
