ember-math-fns
This addon provides math helpers for Ember templates and components.
To install:
ember install ember-math-fns
Usage
math-abs
math-add
math-ceil
math-decrement
math-divide
math-eq
math-floor
math-gt
math-gte
math-increment
math-lt
math-lte
math-max
math-min
math-mod
math-multiply
math-ne
math-negate
math-pow
math-random
math-round
math-sign
math-subtract
math-abs
Determines the absolute value of a number. See Math.abs() for details on the Math.abs function.
math-add
Adds two or more numbers together.
math-ceil
Rounds a number up to the nearest integer. See Math.ceil() for details on the Math.ceil function.
math-decrement
Decrement a value by 1.
math-divide
Divides two or more numbers from left to right.
math-eq
Determines if two or more numbers are equal.
math-floor
Rounds a numbe down to the nearest integer. See Math.fllor() for details on the Math.fllor function.
math-gt
Determines if two or more numbers are greater than each other from left to right.
math-gte
Determines if two or more numbers are greater than or equal to each other from left to right.
math-increment
Increment a value by 1.
math-lt
Determines if two or more numbers are less than each other from left to right.
math-lte
Determines if two or more numbers are less than or equal to each other from left to right.
math-max
Determines the largest of two or more numbers. See Math.max() for details on the Math.max function.
math-min
Determines the smallest of two or more numbers. See Math.min() for details on the Math.min function.
math-mod
Perform the modulus of a value and its divisor to get the remainder.
math-multiply
Multiplies two or more numbers together.
math-ne
Determines if two or more numbers are not equal.
math-negate
Negate/invert the sign for a number.
math-pow
Returns the result of a number to the power of the other. See Math.pow() for details on the Math.pow function.
math-random
Returns a random decimal number between 0 and 1. See Math.random() for details on the Math.random function.
math-round
Round a number to the nearest integer. See Math.round() for details on the Math.round function.
math-sign
Return a -1 for a negative number and positive 1 for positive numbers. See Math.sign() for details on the Math.sign function.
math-subtract
Subtract two or more numbers from left to right.
Related Addons
- See ember-array-fns for array based helpers.
- See ember-datetime-fns for date and time based helpers.
- See ember-intl-fns for internationalization based helpers.
- See ember-logic-fns for logical based helpers.
- See ember-number-fns for number based helpers.
- See ember-string-fns for string based helpers.
Compatibility
- Ember.js v3.4 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
Contributing
See the Contributing guide for details.
License
This project is licensed under the MIT License.