What does modulo in the following piece of code do?
from math import * 3.14 % 2 * pi
How do we calculate modulo on a floating point number?
Same thing you'd expect from normal modulo .. e.g. 7 % 4 = 3, 7.3 % 4.0 = 3.3
7 % 4 = 3
7.3 % 4.0 = 3.3
Beware of floating point accuracy issues.