AINT

Returns the nearest integer whose magnitude is not larger than the integer value of a specified expression that represents a numerical value:
AINT(x) = 0 if ABS(x)< 1
AINT(x)= int(x) if ABS(x)> 1
The value of int(x) is equal to x if x is an integer. If x is not an integer, then int(x) is equal to the integer nearest to x, whose magnitude is not greater than the magnitude of x. Thus,
int(-7.0) = -7, int(-4.8) = -4, and int(4.8) = 4. 
 
Note:  
AINT is not a differentiable function. Be careful when using this function in an expression that defines a force or motion input to the system.

Format

AINT (x)

Argument

 
x
Any valid expression that evaluates to a real number.

Examples

The following functions show how AINT truncates results towards 0:
Function
AINT(0.85)
Result
0
Function
AINT(-0.5)
Result
0
Function
AINT(4.6)
Result
4
Function
AINT(-6.8)
Result
-6