@woosh/meep-engine
Version:
Pure JavaScript game engine. Fully featured and production ready.
29 lines (27 loc) • 797 B
JavaScript
/**
* SI base dimensions, used as indices into a {@link UnitMatrix} exponent vector.
*
* Every physical quantity can be expressed as a product of integer (or rational) powers of these
* 7 base dimensions. See: https://en.wikipedia.org/wiki/International_System_of_Units
*
* The companion {@link UNIT_DIMENSION_MAPPING} array assigns the canonical SI base unit
* (`METER`, `KILOGRAM`, ...) to each dimension index — that is the source of truth for
* per-dimension display symbols.
*
* @readonly
* @enum {number}
*/
export const UnitDimension = {
Length: 0,
Mass: 1,
Time: 2,
ElectricCurrent: 3,
Temperature: 4,
AmountOfSubstance: 5,
LuminousIntensity: 6
};
/**
* Number of SI base dimensions.
* @type {number}
*/
export const UNIT_DIMENSION_COUNT = 7;