Not a clue LOL. I know it takes 2 parameters and you send 2 numbers but i dont actually know what it is.
I asked a friend but his native language isnt english so he couldnt explain it.
So could someone explain please, and give an example of where it would be used.
Also im not a maths guy so quotient doesnt make sense, yes i already checked developer.roblox.com
It’s the same as the modulus
% operator I think.
math.fmod(x, y) returns the same value as
x % y
basically the remainder after dividing 2 numbers
Quotient is the result of division, kind of like how the result of addition is a sum, the result of subtraction is a difference, the result of multiplication is product.
Like mentioned by @blokav, it’s basically modulo.
So its just the division of two numbers??
math.fmod is the remainder of truncated divsion, not the remainder of floor division or modulo unlike the
% operator so are you implying that
math.fmod(-19, 12) returns
5 instead of
Along with that,
x % math.huge returns NaN (before Lua 5.3),
math.fmod(x, math.huge) returns
print(math.fmod(-19, 12)) --> -7
print(-19 % 12) --> 5