Int
Returns the closest integer that is smaller than the number
Method Signature
Int(number=[numeric])
Arguments
Argument
Type
Required
Description
Default
number
numeric
true
The number to calculate the closest integer for
Examples
Closest integer less than 1.8
int( 1.8 );
Result: 1
Additional Examples
writeDump( int( 7.0 ) ); // 7
writeDump( int( 6.9 ) ); // 6
writeDump( int( -2.9 ) );
// -3
Related
Last updated
Was this helpful?