xHarbour Reference Documentation > Function Reference |
Rounds a decimal number to the next lower integer.
Floor( <nValue> ) --> nInteger
The return value is the next lower integer value of <nValue>. If <nValue> is an integer already, it is returned unchanged.
See also: | Ceiling(), Round() |
Category: | CT:Math , Mathematical functions |
Source: | ct\ctmath2.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example shows results of function Floor(). PROCEDURE Main ? Floor( -2.0 ) // result: -2 ? Floor( -2.00001 ) // result: -3 ? Floor( 2.0 ) // result: 2 ? Floor( 2.00001 ) // result: 2 RETURN
http://www.xHarbour.com