# sass-module-math

> This Sass module provides more advanced math functions

Latest version **1.0.0** (published 2021-09-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install sass-module-math
pnpm add sass-module-math
yarn add sass-module-math
bun add sass-module-math
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2021-09-24 |
| First published | 2021-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | roydukkey |
| Maintainers | roydukkey |
| Keywords | sass, scss, dart-sass, math |

## Links

- npm: https://www.npmjs.com/package/sass-module-math
- Repository: https://github.com/roydukkey/sass-module-math
- Homepage: https://github.com/roydukkey/sass-module-math#readme
- Issues: https://github.com/roydukkey/sass-module-math/issues
- npm.io page: https://npm.io/package/sass-module-math

## Dependencies (1)

- [sass-exception](https://npm.io/package/sass-exception.md) ^1.1.0

## Alternatives

- [random-seedable](https://npm.io/package/random-seedable.md) — 27.9K weekly downloads
- [n2words](https://npm.io/package/n2words.md) — 22.2K weekly downloads
- [@stdlib/math-base-special-factorialln](https://npm.io/package/@stdlib/math-base-special-factorialln.md) — 5.7K weekly downloads
- [@stdlib/math-base-special-abs2](https://npm.io/package/@stdlib/math-base-special-abs2.md) — 1.7K weekly downloads
- [commons-math-interpolation](https://npm.io/package/commons-math-interpolation.md) — 1.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2021-09-24

## README

# sass-module-math

[![Release Version](https://img.shields.io/npm/v/sass-module-math.svg)](https://www.npmjs.com/package/sass-module-math)
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)

This Sass module provides more advanced math functions.

## Install

### Requires

Install the package:

```bash
npm install sass-module-math
```

Use the package like any other Sass module:

```scss
@use 'sass-module-math';
```

Depending on your setup, you may need to configure `node_modules` as include path:

```js
const sass = require('sass');

sass.render({
  file: scss_filename,
  includePaths: ['node_modules']
});
```

## Public API

### Bounding Functions

<dl>

  <dt><a href="//github.com/roydukkey/sass-module-math/tree/master/src/math/_gcd.sass"><code>gcd ( $numbers... )</code></a></dt>
  <dd>Returns the Greatest Common Divisor (GCD, GCF, HCF) of a set of numbers.</dd>

  <dt><a href="//github.com/roydukkey/sass-module-math/tree/master/src/math/_lcm.sass"><code>lcm ( $numbers... )</code></a></dt>
  <dd>Returns the Least Common Multiple (LCM) of a set of numbers.</dd>

</dl>

### Exponential Functions

<dl>

  <dt><a href="//github.com/roydukkey/sass-module-math/tree/master/src/math/_exp.sass"><code>exp ( $number )</code></a></dt>
  <dd>Returns Euler's number to the specified power.</dd>

  <dt><a href="//github.com/roydukkey/sass-module-math/tree/master/src/math/_fact.sass"><code>fact ( $number )</code></a></dt>
  <dd>Returns the factorial of the specified integer.</dd>

</dl>

### Unit Functions

<dl>

  <dt><a href="//github.com/roydukkey/sass-module-math/tree/master/src/math/_change.sass"><code>change ( $number, $units )</code></a></dt>
  <dd>Returns the given number with the same units as another specified number.</dd>

  <dt><a href="//github.com/roydukkey/sass-module-math/tree/master/src/math/_unitless.sass"><code>unitless ( $number )</code></a></dt>
  <dd>Returns the unitless value of the specified number.</dd>

</dl>

Don't see the function you're looking for? Request a [new feature](//github.com/roydukkey/sass-module-math/issues/new) 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.

```scss
// Rather than using both modules separately...
@use 'sass-module-math';
@use 'sass:math';

// ...this statement will accomplish the same thing.
@use 'sass-module-math/math';
```

---
_Source: https://npm.io/package/sass-module-math · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
