@pencil.js/math
Version:
Math wrapper for Pencil.js package.
26 lines (14 loc) • 348 B
Markdown
Wrapper for some mathematical helpers.
npm install @pencil.js/math
```js
import * as PMath from "@pencil.js/math";
PMath.truncate(-99.9); // -99
// or
import { constrain } from "@pencil.js/math";
constrain(99, 0, 10); // 10
```
Go check the [full documentation](documentation.md).