fmod(Variable, Variable) Function

Top 

Description

Computes the fractional remainder of the division (x/y). This modulo calculation can also be performed using the syntax: x%y. The fmod function requires y to be greater than zero, while the % syntax allows negative values for y.

 

Timing Precision Mode

This page describes functionality in millisecond timing precision mode.

 

Function Signature

fmod(

Variable x,


Variable y)

 

 

Arguments

x


Description:

Numerator used in the division calculation.

 

 

y


Description:

Denominator used in the division calculation.

Valid Range:

y > 0

 

 

 

Return Value

Type:

number

 

 

The fractional remainder of the division (x/y).

 

Syntax

myVariable1 = fmod(myVariable2, myVariable3);

 

 

Example 1

 

 

Example 2

 

 

See also

fmod