Use math.fmod(x,y)
which does what you want:
Returns the remainder of the division of x by y that rounds the
quotient towards zero.
Use math.fmod(x,y)
which does what you want:
Returns the remainder of the division of x by y that rounds the
quotient towards zero.