UNPKG

@thi.ng/units

Version:

Extensible SI unit creation, conversions, quantities & calculations, CLI calculator (incl. Lisp-like DSL and ~170 predefined units & constants)

18 lines (17 loc) 437 B
import { defUnit, div, pow } from "../unit.js"; import { rad } from "./angle.js"; import { ft, m } from "./length.js"; import { s } from "./time.js"; const s2 = pow(s, 2); const m_s2 = defUnit("m/s2", "meter per second squared", div(m, s2)); const ft_s2 = defUnit("ft/s2", "foot per second squared", div(ft, s2)); const rad_s2 = defUnit( "rad/s2", "radian per second squared", div(rad, s2) ); export { ft_s2, m_s2, rad_s2 };