Sign in Join
FPDoc Onlineexperiment

modulus(Float,Float):Float operator

In unit Math

Floating point modulo.

Declaration

pascal
operator mod(const a: Float; const b: Float): Float

Description

Modulus is the floating-point equivalent of the modulo operation a mod b. It returns the result of

a-b * Int(a/b)

Errors

b may not be zero, but no check is performed.

See also

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.