Floor
Returns the absolute value of a number
Method Signature
Floor(number=[numeric])
Arguments
Argument
Type
Required
Description
Default
number
numeric
true
Examples
Floor Value of 4.0
floor( 4.0 );
Result: 4
Floor Value of 4.3
floor( 4.3 );
Result: 4
Floor Value of 4.7
floor( 4.7 );
Result: 4
Floor Value of -4.3
floor( -4.3 );
Result: -5
Additional Examples
dump( floor( 2.0 ) ); // 2
dump( floor( 7.2 ) ); // 7
dump( floor( 4.9 ) ); // 4
dump( floor( -5.7 ) );
// -6
Related
Last updated
Was this helpful?