cpr.foundation.DecimalType
Decimal data type.
Index
Constructor
Create a decimal object using number.
| name |
type |
description |
| data
|
Number |
The number to make a decimal. |
Methods
Returns numberValue as DecimalType.
| name |
type |
description |
| numberValue
|
Number |
|
Returns stringValue as DecimalType.
| name |
type |
description |
| stringValue
|
String |
|
Compare values.
| return
|
Number |
Comparison result.
(1: The current value is larger. / 0: The current value and the param value are the same / -1: The current value is smaller. / NaN: Invalid param was entered.) |
Perform a division (÷) operation.
Compare the current decimal value and the same value.
| return
|
Boolean |
If the input value is the same as the current decimal value, True, or false. |
Perform a subtraction (-) operation.
| name |
type |
description |
| x
|
DecimalType |
Data to be subtracted. |
Perform a plus (+) operation.
Perform the remaining (%) operation.
| name |
type |
description |
| x
|
DecimalType |
Data to do the rest of the calculation. |
Perform a multiplication (x) operation.
Returns the current decimal value as a number.
| return
|
Number |
Number data of the current decimal value. |