Go to: Synopsis. Return value. MEL examples.

Synopsis

fmod float float

fmod is NOT undoable, NOT queryable, and NOT editable.

Returns the floating-point remainder of the division of it arguments x and y. The result is a number f with the same sign as x such that x = iy + f for some integer i and |f| < |y|.

This command is implemented using the built-in system function.

Return value

floatDivision remainder

MEL examples

fmod 5.5 1;
// Result:, 0.5 //

fmod 5.6 1.1;
// Result:, 0.1 //

fmod -5.6 1.1;
// Result:, -0.1 //

fmod 5.6 2;
// Result:, 1.6 //