Link Search Menu Expand Document

Fixed.RoundUp method

Explanation Returns the specified parameter rounded up as a Fixed object.
This method is a static method. It can be called without creating an object.
Rounding up the Fixed.RoundUp method (when the number of digits = 0) is the closest integer in the direction of the larger absolute value (farther from 0).
Call format var f = Fixed.RoundUp ( n [, d ])
Return value Rounded up value ( Fixed object)
Arguments n Specify the number to be round up as Fixed type, Number type, or String type.
integer d Specify the digit you want to round up.
It can be specified by -14 to 3.
0 is round up to the nearest whole number, and 3 is round up to the third decimal place.
If it is a negative number, it will be specified in the direction of the integer value. If omitted, it is 0.
Exception None
Example of use
print (Fixed.RoundUp (12345.678F, -2)); / * 12400 * /
print (Fixed.RoundUp (12345.678F));      / * It becomes 12346 * /
print (Fixed.RoundUp (12345.678F, 2));   / * It becomes 12345.68 * /
 
print (Fixed.RoundUp (0.50F));   / * 1 * /
print (Fixed.RoundUp (-0.50F)); / * -1 * /
Related item