1.0.0 • Published 5 years ago

mathit v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

mathit

Utilities for calculating coordinates and other math-stuff

import { radians } from 'mathit'

radians(90) // convert degrees to radians
import { polygon } from 'mathit'

const points = polygon({
  radius: 16,
  center: 16,
  sides: 6,
  angle: -90
})
// returns an array of `[x, y]` coordinates for a regular polygon

MIT License