Click or drag to resize

Floor Function

Round a number down to the next lowest integer.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.08
Syntax
 FUNCTION Floor(
	nNum AS USUAL
) AS USUAL
View Source

Parameters

nNum
Type: Usual
The number to round.

Return Value

Type: Usual
The nearest integer that is less than or equal to <nNum>.
Remarks
Floor() rounds a negative value with a fractional portion down to the preceding integer and returns the integer portion of a positive number.
Examples
This example uses Floor() on a positive and a negative number:
X#
? Floor(1.6)                        // 1
? Floor(-1.6)                        // -2 (since -2 < -1)
See Also