Skip to content
Snippets Groups Projects
Commit 476d675a authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Add momentum and angular momentum to the unit conversion system.

parent feb6dd49
No related branches found
No related tags found
No related merge requests found
......@@ -279,6 +279,18 @@ void units_get_base_unit_exponents_array(float baseUnitsExp[5],
baseUnitsExp[UNIT_TIME] = -2.f;
break;
case UNIT_CONV_MOMENTUM:
baseUnitsExp[UNIT_MASS] = 1.f;
baseUnitsExp[UNIT_LENGTH] = 1.f;
baseUnitsExp[UNIT_TIME] = -1.f;
break;
case UNIT_CONV_ANGULAR_MOMENTUM:
baseUnitsExp[UNIT_MASS] = 1.f;
baseUnitsExp[UNIT_LENGTH] = 2.f;
baseUnitsExp[UNIT_TIME] = -1.f;
break;
case UNIT_CONV_FORCE:
baseUnitsExp[UNIT_MASS] = 1.f;
baseUnitsExp[UNIT_LENGTH] = 1.f;
......
......@@ -76,6 +76,8 @@ enum unit_conversion_factor {
UNIT_CONV_VELOCITY,
UNIT_CONV_ACCELERATION,
UNIT_CONV_POTENTIAL,
UNIT_CONV_MOMENTUM,
UNIT_CONV_ANGULAR_MOMENTUM,
UNIT_CONV_FORCE,
UNIT_CONV_ENERGY,
UNIT_CONV_ENERGY_PER_UNIT_MASS,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment