Link Search Menu Expand Document

Number.ToFixed Method

Explanation Returns the value stored in the Number object as a fixed-point string.
*Use the Fixed constructor to convert to the Fixed class.
Call format var text = num.ToFixed( [ fractionDigits ] )
Return value Fixed-point notation string
Arguments integer fractionDigits Number of digits after the decimal point.
It can be specified between 0 and 15. If omitted, it will be 0.
Exception Func-4 The argument value is invalid.
Example of use
var num = new Number;
num.Value = 5678.12345;
print(num.ToFixed(3), "\n");
 
---Output result---
5678.123
Related item