static float UnsignedMod( float a, float b )

robot_2Generated
code_blocksInput

Description

The UnsignedMod method computes the unsigned modulus of two floating-point numbers. This method is useful when you need to ensure that the result of a modulus operation is always non-negative, even if the dividend is negative.

Usage

To use the UnsignedMod method, provide two float values as parameters. The first parameter a is the dividend, and the second parameter b is the divisor. The method returns the remainder of the division of a by b, ensuring the result is non-negative.

Example

float result = MathX.UnsignedMod(-5.5f, 3.0f);
// result is 0.5f