3.0.0 • Published 3 years ago

@thewhodidthis/arithmetics v3.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

about

Essential math utils to help with animating.

setup

Download from the the npm registry:

# Add to package.json
npm install @thewhodidthis/arithmetics

usage

Expect named exports for each function and a constant for TAU as for example,

import * as math from "@thewhodidthis/arithmetics"

const degrees = math.deg(math.TAU)
console.assert(degrees, 360)

const radians = math.rad(180)
console.assert(radians, Math.PI)

const stretch = math.mag(3, 4)
console.assert(stretch, 5)

const percent = math.map(0.5, 0, 1, 0, 100)
console.assert(percent, 50)

see also

3.0.0

3 years ago

1.0.1

4 years ago

2.0.0

4 years ago

1.0.0

4 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago