JSPM

css-angles

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 2
  • Score
    100M100P100Q25816F
  • License MIT

A representation and unit conversion tool for CSS angles

Package Exports

  • css-angles

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (css-angles) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

This is a tiny library able to hyper-efficiently convert CSS angles to and from different units, as described here.

This library was auto-generated using QuickConvert.

Supported Units

  • deg
  • turn
  • grad
  • rad

Example

const a = new Angle()
a.deg = 180

const b = new Angle('1turn')
b.deg // 360
b.turn = 2
b.deg += 20
b.deg // 740

const c = new Angle(90, 'deg')
c.add(b)
const d = Angle.sub(c, a)

Reference

For a full reference, see the documentation of the quickconvert-project.