Hmm ... seems like a negative operand produce an incorrect value.
Look what it's writting :
Code:
/* forbidden operations */
forward operator%(Float:oper1, Float:oper2);
forward operator%(Float:oper1, oper2);
forward operator%(oper1, Float:oper2);
forbidden operations! lol
Edit : Sorry I was wrong :
So here it is the results :
In pawn
Code:
5/3 = ( 1.66 = 1) 5 % 3 = 2 Correct ( wrong in the #2 Code )
-5/3 = (-1.66 = -2) -5 % 3 = 1 Correct \\ \\ \\
5/-3 = (-1.66 = -2) 5 % -3 =-1 Correct \\ \\ \\
-5/-3=1 ( 1.66 = 1) -5 % -3 =-2 Correct \\ \\ \\
It's using float round to get the result ( similar to floatround_round ) but in c++ it's using floatround_tozero ).
So one is returning the nearest number to X and c++ the opposite.
__________________
XX was created just for giving evidence and not meant to damage public servers.
&We do not test on public servers.
Thank's.