Home > @i2analyze/i2connect > data > createDecimal
data.createDecimal() function
Creates a decimal value from a number or a string.
Signature:
function createDecimal(value: number | string): IDecimal;
Introduced: API version 2.0
Parameters
Parameter | Type | Description |
---|---|---|
value | number | string | The number or string to initialize the decimal value from. |
Returns:
The new decimal value.
Exceptions
Error
if the value was NaN
, or too large to be a decimal, or an invalid string.