Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- inline float mod(float x, float y)
- {
- float result = std::fmod(x, y);
- return result >= 0 ? result : result + y;
- }
- int main(void)
- {
- int remainder = mod(-1.4, 2.5);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement