UNPKG

measure-convert

Version:

JS/TS package for managing units of measurement. Convert, add, subtract, multiply, divide, and compare units of measurement.

19 lines (18 loc) 1.04 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.UnitAngle = void 0; // src/units/UnitAngle.ts const Unit_1 = require("./Unit"); class UnitAngle extends Unit_1.Unit { constructor(name, symbol, description, baseUnitConversionFactor) { super(name, symbol, description, baseUnitConversionFactor); } } exports.UnitAngle = UnitAngle; UnitAngle.degrees = new UnitAngle("Degrees", "°", "Unit of measure for planar angle", 1.0); UnitAngle.arcMinutes = new UnitAngle("Arc Minutes", "ʹ", "1/60 of a degree", 1 / 60); // Increased precision UnitAngle.arcSeconds = new UnitAngle("Arc Seconds", "ʺ", "1/3600 of a degree", 1 / 3600); // Increased precision UnitAngle.radians = new UnitAngle("Radians", "rad", "Angle subtended by an arc equal in length to the radius of a circle", 180 / Math.PI // More precise conversion factor ); UnitAngle.gradians = new UnitAngle("Gradians", "grad", "1/400 of a revolution", 0.9); UnitAngle.revolutions = new UnitAngle("Revolutions", "rev", "360 degrees", 360.0);