Number Methods
The Number methods allow you to manipulate numeric data. To display
a complete list of available number methods, click Number and then click Settings.
Table 3 Number Methods
|
The
ceiling method returns the smallest integer that is not less than the value
of number1. |
The floor method returns the largest integer that is not greater than
the value of number1. |
The number method converts object1 to a numerical value
according to the following rules:
Boolean true is converted to 1; Boolean false is converted to 0.
A string that includes whitespace at the beginning and end, a minus sign, and a number (where the whitespace and minus sign are optional) is converted to the closest IEEE 754 number.
Strings that do not compute to a numerical value are converted to NaN.
A set of nodes is converted to a string and then converted as a string (as described above).
|
The number literal method allows you to create a number
of fixed length and content. You can type the value directly into the
method box. |
The round method rounds the value of number1 to the nearest integer. |
The
sum method returns the total value of the set of numeric values in
node-set1. |
|