I am trying to replicate the behavior of Math.IEEERemainder (in C#) in Lua. I know that I can always write the entire thing from scratch, but I am trying to avoid it if there is something built-in.
I have tried the % operator and math.fmod. None of them behave the same.
For instance:
Math.IEEERemainder(3.0,2.0) //-1
(3.0%2.0) --1
math.fmod(3.0,2.0) --1