Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- float2.inc
- kvann 2015, no rights reserved at all.
- */
- #include <a_samp>
- #if defined _float2_included
- #endinput
- #endif
- #define _float2_included
- /*
- native Float:floatmod(Float:oper1, Float:oper2);
- */
- stock Float:floatmod(Float:oper1, Float:oper2)
- {
- while (oper1 >= oper2) oper1 -= oper2;
- while (oper1 < 0.0) oper1 += oper2;
- return oper1;
- }
- native operator=(Float:oper) = floatround;
- stock Float:operator%(Float:oper1, Float:oper2) return floatmod(oper1, oper2);
- stock Float:operator%(oper1, Float:oper2) return floatmod(float(oper1), oper2);
- stock Float:operator%(Float:oper1, oper2) return floatmod(oper1, float(oper2));
Advertisement
Add Comment
Please, Sign In to add comment