- Theme Engine
- Design Principles
- Templates
- EVML Reference
- Output
- Comments
- Operators
- Statements and Declarations
- Built-in Functions
- Built-in Objects
- Account
- Address
- Array
- Boolean
- Branch
- Cart
- CartLine
- Category
- CategoryCollection
- CategoryFilter
- CategoryFilterCollection
- CategoryFilterOption
- CategorySearch
- Collection
- Color
- Contact
- Currency
- Date
- Discount
- Dom
- Event
- EventCollection
- EventSlot
- Image
- Layout
- Locale
- Money
- Number
- Object
- Page
- PageCollection
- PageSearch
- PageSharer
- Pagination
- Postage
- Price
- PriceDiscount
- Product
- ProductCollection
- ProductCustomisation
- ProductDownload
- ProductMedia
- ProductMediaFrame
- ProductPrice
- ProductSearch
- ProductSpecification
- ProductSpecificationValue
- ProductVariation
- ProductVariationOption
- RecentlyViewed
- RegExp
- Request
- Review
- ReviewCollection
- Search
- SearchCollection
- SearchResult
- String
- Tag
- Template
- Url
- Website
- EV Tags
- CSS Pre-processor
- Ajax API
Number
Extends Literal. EV Script has one type of number.
Methods | |
---|---|
abs() |
Returns Number Returns the absolute unsigned value of a number leaving the original Number unmutated.
|
acos() |
Returns Number Returns the arc cosine of the original Number in radians leaving the original Number unmutated.
|
asin() |
Returns Number Returns the arc sine of the original Number in radians leaving the original Number unmutated.
|
atan() |
Returns Number Returns the arc tan of the original Number in radians leaving the original Number unmutated.
|
ceil() |
Returns Number Returns a new Number rounded up to the nearest integer leaving the original Number unmutated.
|
cos() |
Returns Number Returns the cosine of the original Number in radians leaving the original Number unmutated.
|
exp() |
Returns 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() |
Returns Number Returns a new Number rounded down to the nearest integer leaving the original Number unmutated.
|
format([Number:precision [, String:decimal [, String:thousand]]]) |
Returns 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 (,).
|
log() |
Returns Number Returns the natural logarithm of the original number as a new Number leaving the original unmutated.
|
pow(Number:exponent) |
Returns Number Returns the original number raised to the power of the exponent as a new Number leaving the original unmutated.
|
round([Number:precision]) |
Returns 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.
|
sin() |
Returns Number Returns the sine of the original Number in radians leaving the original Number unmutated.
|
sqrt() |
Returns Number Returns the square root of the original Number as new Number leaving the original Number unmutated.
|
tan() |
Returns Number Returns the tan of the original Number in radians leaving the original Number unmutated.
|
toMoney([String:isoCode]) |
Returns 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.
|
wrap(String:tag) |
Returns String Allows you to wrap a number with any valid HTML tag and returns the resulting String.
|