new Units()
Provides classes and tools for converting between multiple different units.
This namespace includes a range of classes that encapsulate different categories
of unit types that can all be directly converted between each other. For example,
a PD.Units.Temperature object can store a value in degrees Celsius, Fahrenheit,
Rankine or Kelvin, and convert between them. A PD.Units.Energy object stores
values in Joules, Btu, foot-pounds-force or horsepower and convert between them.
However, an energy value cannot be converted into a temperature nor a temperature into an energy value. Thus, using different objects for each category of units hopefully makes for a clearer and more robust API for handling units and their conversions.
Classes
Members
-
:number
ATMOSPHERES <static, constant>
-
The
PD.Units.Pressureidentifier for Atmospheres (atm).Type
- number
-
:number
BAR <static, constant>
-
The
PD.Units.Pressureidentifier for bar (bar).Type
- number
-
:number
BTU_PER_POUND <static, constant>
-
The
PD.Units.Enthalpyidentifier for British thermal units per pound (Btu/lb).Type
- number
-
:number
CELSIUS <static, constant>
-
The
PD.Units.Temperatureidentifier for degrees Celsius (°C).Type
- number
-
:number
CUBIC_FEET_PER_POUND <static, constant>
-
The
PD.Units.SpecificVolumeidentifier for cubic feet per pound (ft3/lb).Type
- number
-
:number
CUBIC_METERS_PER_KILOGRAM <static, constant>
-
The
PD.Units.SpecificVolumeidentifier for cubic meters per kilogram (m3/kg).Type
- number
-
:number
FAHRENHEIT <static, constant>
-
The
PD.Units.Temperatureidentifier for degrees Fahrenheit (°F).Type
- number
-
:number
FEET_PER_MINUTE <static, constant>
-
The
PD.Units.Velocityidentifier for feet per second (ft/s).Type
- number
-
:number
FEET_PER_SECOND <static, constant>
-
The
PD.Units.Velocityidentifier for feet per second (ft/s).Type
- number
-
:number
GRAINS_PER_POUND <static, constant>
-
The
PD.Units.HumidityRatioidentifier for grains of water per pound of dry air (gr/lb).Type
- number
-
:number
GRAMS_PER_KILOGRAM <static, constant>
-
The
PD.Units.HumidityRatioidentifier for grams of water per kilogram of dry air (g/kg).Type
- number
-
:number
INCHES_MERCURY <static, constant>
-
The
PD.Units.Pressureidentifier for inches of mercury (inHg).Type
- number
-
:number
JOULES_PER_KILOGRAM <static, constant>
-
The
PD.Units.Enthalpyidentifier for Joules per kilogram (m3/kg).Type
- number
-
:number
KELVIN <static, constant>
-
The
PD.Units.Temperatureidentifier for degrees Kelvin (K).Type
- number
-
:number
KILOGRAMS_PER_KILOGRAM <static, constant>
-
The
PD.Units.HumidityRatioidentifier for kilograms of water per kilogram of dry air (kg/kg).Type
- number
-
:number
KILOMETERS_PER_HOUR <static, constant>
-
The
PD.Units.Velocityidentifier for kilometres per hour (km/h).Type
- number
-
:number
KILOPASCAL <static, constant>
-
The
PD.Units.Pressureidentifier for kilo-Pascal (Pa).Type
- number
-
:number
KILO_JOULES_PER_KILOGRAM <static, constant>
-
The
PD.Units.Enthalpyidentifier for kilo-Joules per kilogram (m3/kg).Type
- number
-
:number
KNOTS <static, constant>
-
The
PD.Units.Velocityidentifier for knots (kn).Type
- number
-
:number
METERS_PER_SECOND <static, constant>
-
The
PD.Units.Velocityidentifier for meters per second (m/s).Type
- number
-
:number
MILES_PER_HOUR <static, constant>
-
The
PD.Units.Velocityidentifier for miles per hour (mph).Type
- number
-
:number
MILLIMETERS_MERCURY <static, constant>
-
The
PD.Units.Pressureidentifier for millimeters of mercury (mmHg).Type
- number
-
:number
PASCAL <static, constant>
-
The
PD.Units.Pressureidentifier for Pascal (Pa).Type
- number
-
:number
POUNDS_PER_POUND <static, constant>
-
The
PD.Units.HumidityRatioidentifier for pounds of water per pound of dry air (lb/lb).Type
- number
-
:number
POUNDS_PER_SQUARE_INCH <static, constant>
-
The
PD.Units.Pressureidentifier for pounds per square inch (Psi).Type
- number
-
:number
RANKINE <static, constant>
-
The
PD.Units.Temperatureidentifier for degrees Rankine (°R).Type
- number