Number
Extends Literal. EV Script has one type of number.
Methods |
---|
abs()
Number
Returns the absolute unsigned value of a number leaving the original Number unmutated.
|
acos()
Number
Returns the arc cosine of the original Number in radians leaving the original Number unmutated.
|
acosh()
Number
Returns the hyperbolic arc-cosine of the number.
|
asin()
Number
Returns the arc sine of the original Number in radians leaving the original Number unmutated.
|
asinh()
Number
Returns the hyperbolic arcsine of the number.
|
atan()
Number
Returns the arc tan of the original Number in radians leaving the original Number unmutated.
|
atanh()
Number
Returns the hyperbolic arctangent of the number.
|
ceil()
Number
Returns a new Number rounded up to the nearest integer leaving the original Number unmutated.
|
cbrt()
Number
Returns the cube root of a number. |
cos()
Number
Returns the cosine of the original Number in radians leaving the original Number unmutated.
|
cosh()
Number
Returns hyperbolic cosine of a number. |
decimal([precision = 2])
String
Returns the number as a string to the |
decimalPlaces()
Number
Returns the number of decimal places of found in the value. |
exp()
Number
Returns the exponent of 'e' (approx. 2.718282) raised to the power of the original Number as a new Number leaving the original Number unmutated.
|
floor()
Number
Returns a new Number rounded down to the nearest integer leaving the original Number unmutated.
|
format([precision [, decimal [, thousand]]])
String
A fixed format for the Number value. Since Evance is primarily an ecommerce platform the default value for precision is 2 decimal places, the default decimal value is a dot (.) and the default thousand point is a comma (,). Parameters
|
isInteger()
Boolean
Returns |
isNegative()
Boolean
Returns |
isPositive()
Boolean
Returns |
isZero()
Boolean
Returns |
log()
Number
Returns the natural logarithm of the original number as a new Number leaving the original unmutated.
|
pow(Number:exponent)
Number
Returns the original number raised to the power of the exponent as a new Number leaving the original unmutated.
|
round([Number:precision])
Number
Returns the current number to the supplied decimal precision as a new number. Since Evance is primarily an ecommerce platform the default precision is 2 decimal places.
|
sign()
Number
Returns either a positive or negative +/- 1, indicating the sign of the number. If the number is 0, it will return a +/- 0. |
sin()
Number
Returns the sine of the original Number in radians leaving the original Number unmutated.
|
sinh()
Number
Returns the hyperbolic sine of the Number. |
sqrt()
Number
Returns the square root of the original Number as new Number leaving the original Number unmutated.
|
tan()
Number
Returns the tan of the original Number in radians leaving the original Number unmutated.
|
tanh()
Number
Returns the hyperbolic tangent of the Number. |
toMoney([String:isoCode])
Money
Returns a new Money object with the current Number as the decimal value. If a currency isoCode is not supplied the currency used is that of the current locale. You can explicitly set the currency by supplying a valid currency ISO Code e.g. GBP or USD.
|
toPrecision()
String
Returns a string representing the Number object to the specified precision. |
trunc()
Number
Returns the integer part of a number by removing any fractional digits. |
wrap(String:tag)
String
Allows you to wrap a number with any valid HTML tag and returns the resulting String.
|