This addon provides math helpers for Ember templates and components.
To install:
ember install ember-math-fns
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
Determines the absolute value of a number. See Math.abs() for details on the Math.abs function.
Adds two or more numbers together.
Rounds a number up to the nearest integer. See Math.ceil() for details on the Math.ceil function.
Decrement a value by 1.
Divides two or more numbers from left to right.
Determines if two or more numbers are equal.
Rounds a numbe down to the nearest integer. See Math.fllor() for details on the Math.fllor function.
Determines if two or more numbers are greater than each other from left to right.
Determines if two or more numbers are greater than or equal to each other from left to right.
Increment a value by 1.
Determines if two or more numbers are less than each other from left to right.
Determines if two or more numbers are less than or equal to each other from left to right.
Determines the largest of two or more numbers. See Math.max() for details on the Math.max function.
Determines the smallest of two or more numbers. See Math.min() for details on the Math.min function.
Perform the modulus of a value and its divisor to get the remainder.
Multiplies two or more numbers together.
Determines if two or more numbers are not equal.
Negate/invert the sign for a number.
Returns the result of a number to the power of the other. See Math.pow() for details on the Math.pow function.
Returns a random decimal number between 0 and 1. See Math.random() for details on the Math.random function.
Round a number to the nearest integer. See Math.round() for details on the Math.round function.
Return a -1 for a negative number and positive 1 for positive numbers. See Math.sign() for details on the Math.sign function.
Subtract two or more numbers from left to right.
- 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.
- Ember.js v3.4 or above
- Ember CLI v2.13 or above
- Node.js v8 or above
See the Contributing guide for details.
This project is licensed under the MIT License.