MindFusion.Wpf Pack Programmer's Guide
FLOOR

Rounds the specified number down, towards zero, to the nearest multiple of the specified value.

Syntax  Copy Code

FLOOR( Number n, [Number significance], [Integer mode = 0] ) Number

Parameters

n
Required. The value to round.
significance
Optional. The multiple to which to round.
mode
Optional. The type of rounding to perform (see Remarks).

Remarks

If n and significance are not 0 and have different signs, the function returns the #NUM! error value.

If significance is omitted or an empty parameter (two consecutive commas) it is assumed to be -1 if n is negative and +1 if n is non-negative, making the function act like the normal mathematical floor function if mode is not given or zero. If mode is given and not equal to zero, the absolute value of n is rounded away from zero to a multiple of the absolute value of significance and then the sign applied. Otherwise, it rounds toward negative infinity, and the result is the largest multiple of significance that is less than or equal to n. If the specified mode value is not an integer, it is automatically truncated.

If any of the two parameters n or significance is zero, the result is zero.

Example

Formula  Copy Code

=FLOOR(3.5,1)
=FLOOR(0.123,0.01)
=FLOOR(-3.5,-1)
=FLOOR(-3.5,-1,1)

See Also

Function Reference
CEILING Function
EVEN Function
INT Function
ODD Function
ROUND Function
ROUNDDOWN Function
ROUNDUP Function
TRUNC Function