API Overview
Bounding Functions
gcd ( $numbers... )
Returns the Greatest Common Divisor (GCD) of a set of numbers.
lcm ( $numbers... )
Returns the Least Common Multiple (LCM) of a set of numbers.
Exponential Functions
exp ( $numbers )
Returns Euler’s number raised to the specified power.
fact ( $numbers )
Returns the factorial of the specified integer.
Unit Functions
change ( $number, $units )
Returns the given number with the same units as another specified number.
unitless ( $number )
Returns the unitless value of the specified number.
Don’t see the function you’re looking for? Request a new feature describing a use case.
Combined API
In order to avoid constantly declaring both the native sass:math
module and this library, the combined API has been added which merges the two.
// Rather than using both modules separately...
@use '@sass-fairy/math';
@use 'sass:math';
// ...this statement will accomplish the same thing.
@use '@sass-fairy/math/math';