The number object represents a numeric value and includes arithmetical functions and a function to convert to a string type
Name | Description | Parameters | Return Type | Usage Examples | |
---|---|---|---|---|---|
Add | Adds the specified number to the current number and returns the result | number | |||
Ceiling | Returns the smallest integer greater than or equal to the current decimal number | number | |||
Decrement | Decrements the current number by one | number | |||
Divide | Divides the current number by the specified number and returns the result | number | |||
Floor | Returns the largest integer less than or equal to the current decimal number | integer | |||
Increment | Increments the current number by one | number | |||
IntegerDivide | Divides the current integer by the specified integer and returns an integer result | integer | |||
Modulus | Returns the remainder after dividing the current number by the specified number | number | |||
Multiply | Multiplies the current number by the specified number and returns the result | number | |||
Round | Rounds the current decimal number to the nearest integer | integer | |||
Subtract | Subtracts the specified number from the current number and returns the result | number | |||
ToString | Parses current number to a string, allowing string operations and functions | string | |||