- Object
-
- UnitConversion
-
public final class UnitConversion extends Object
Class used to convert units.dyn4j uses meters-kilograms-seconds (MKS) units by default. This class can be used to convert to and from MKS.
- Since:
- 1.0.0
- Version:
- 3.2.0
- Author:
- William Bittle
-
-
Field Summary
Fields Modifier and Type Field Description static double
FOOT_POUND_TO_NEWTON_METER
1 foot-pound =FOOT_POUND_TO_NEWTON_METER
newton-metersstatic double
FOOT_TO_METER
1 foot =FOOT_TO_METER
metersstatic double
KILOGRAM_TO_POUND
1 kilogram =KILOGRAM_TO_POUND
poundsstatic double
KILOGRAM_TO_SLUG
1 kilogram =KILOGRAM_TO_SLUG
slugsstatic double
METER_TO_FOOT
1 meter =METER_TO_FOOT
feetstatic double
NEWTON_METER_TO_FOOT_POUND
1 newton-meter =NEWTON_METER_TO_FOOT_POUND
foot-poundsstatic double
NEWTON_TO_POUND
1 newton =NEWTON_TO_POUND
pound-forcestatic double
POUND_TO_KILOGRAM
1 pound-mass =POUND_TO_KILOGRAM
kilogramsstatic double
POUND_TO_NEWTON
1 pound-force =POUND_TO_NEWTON
newtonsstatic double
SLUG_TO_KILOGRAM
1 slug =SLUG_TO_KILOGRAM
kilograms
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
feetPerSecondToMetersPerSecond(double feetPerSecond)
Converts feet per second to meters per second.static double
feetToMeters(double feet)
Converts feet to meters.static double
footPoundsToNewtonMeters(double footPound)
Converts foot-pounds to newton-meters.static double
kilogramsToPounds(double kilograms)
Converts kilograms to pound-mass.static double
kilogramsToSlugs(double kilograms)
Converts kilograms to slugs.static double
metersPerSecondToFeetPerSecond(double metersPerSecond)
Converts meters per second to feet per second.static double
metersToFeet(double meters)
Converts meters to feet.static double
newtonMetersToFootPounds(double newtonMeters)
Converts newton-meters to foot-pounds.static double
newtonsToPounds(double newtons)
Converts newtons to pound-force.static double
poundsToKilograms(double pound)
Converts pound-mass to kilograms.static double
poundsToNewtons(double pound)
Converts pound-force to newtons.static double
slugsToKilograms(double slugs)
Converts slugs to kilograms.
-
-
-
Field Detail
-
FOOT_TO_METER
public static final double FOOT_TO_METER
1 foot =FOOT_TO_METER
meters- See Also:
- Constant Field Values
-
METER_TO_FOOT
public static final double METER_TO_FOOT
1 meter =METER_TO_FOOT
feet- See Also:
- Constant Field Values
-
SLUG_TO_KILOGRAM
public static final double SLUG_TO_KILOGRAM
1 slug =SLUG_TO_KILOGRAM
kilograms- See Also:
- Constant Field Values
-
KILOGRAM_TO_SLUG
public static final double KILOGRAM_TO_SLUG
1 kilogram =KILOGRAM_TO_SLUG
slugs- See Also:
- Constant Field Values
-
POUND_TO_KILOGRAM
public static final double POUND_TO_KILOGRAM
1 pound-mass =POUND_TO_KILOGRAM
kilograms- See Also:
- Constant Field Values
-
KILOGRAM_TO_POUND
public static final double KILOGRAM_TO_POUND
1 kilogram =KILOGRAM_TO_POUND
pounds- See Also:
- Constant Field Values
-
POUND_TO_NEWTON
public static final double POUND_TO_NEWTON
1 pound-force =POUND_TO_NEWTON
newtons- See Also:
- Constant Field Values
-
NEWTON_TO_POUND
public static final double NEWTON_TO_POUND
1 newton =NEWTON_TO_POUND
pound-force- See Also:
- Constant Field Values
-
FOOT_POUND_TO_NEWTON_METER
public static final double FOOT_POUND_TO_NEWTON_METER
1 foot-pound =FOOT_POUND_TO_NEWTON_METER
newton-meters- See Also:
- Constant Field Values
-
NEWTON_METER_TO_FOOT_POUND
public static final double NEWTON_METER_TO_FOOT_POUND
1 newton-meter =NEWTON_METER_TO_FOOT_POUND
foot-pounds- See Also:
- Constant Field Values
-
-
Method Detail
-
feetToMeters
public static final double feetToMeters(double feet)
Converts feet to meters.- Parameters:
feet
- the length value in feet- Returns:
- double the length value in meters
-
slugsToKilograms
public static final double slugsToKilograms(double slugs)
Converts slugs to kilograms.- Parameters:
slugs
- the mass value in slugs- Returns:
- double the mass value in kilograms
-
poundsToKilograms
public static final double poundsToKilograms(double pound)
Converts pound-mass to kilograms.- Parameters:
pound
- the mass value in pound-masses- Returns:
- double the mass value in kilograms
-
feetPerSecondToMetersPerSecond
public static final double feetPerSecondToMetersPerSecond(double feetPerSecond)
Converts feet per second to meters per second.- Parameters:
feetPerSecond
- the velocity in feet per second- Returns:
- double the velocity in meters per second
-
poundsToNewtons
public static final double poundsToNewtons(double pound)
Converts pound-force to newtons.- Parameters:
pound
- the force value in pound-force- Returns:
- double the force value in newtons
-
footPoundsToNewtonMeters
public static final double footPoundsToNewtonMeters(double footPound)
Converts foot-pounds to newton-meters.- Parameters:
footPound
- the torque value in foot-pounds- Returns:
- double the torque value in newton-meters
-
metersToFeet
public static final double metersToFeet(double meters)
Converts meters to feet.- Parameters:
meters
- the length value in meters- Returns:
- double the length value in feet
-
kilogramsToSlugs
public static final double kilogramsToSlugs(double kilograms)
Converts kilograms to slugs.- Parameters:
kilograms
- the mass value in kilograms- Returns:
- double the mass value in slugs
-
kilogramsToPounds
public static final double kilogramsToPounds(double kilograms)
Converts kilograms to pound-mass.- Parameters:
kilograms
- the mass value in kilograms- Returns:
- double the mass value in pound-masses
-
metersPerSecondToFeetPerSecond
public static final double metersPerSecondToFeetPerSecond(double metersPerSecond)
Converts meters per second to feet per second.- Parameters:
metersPerSecond
- the velocity in meters per second- Returns:
- double the velocity in feet per second
-
newtonsToPounds
public static final double newtonsToPounds(double newtons)
Converts newtons to pound-force.- Parameters:
newtons
- the force value in newtons- Returns:
- double the force value in pound-force
-
newtonMetersToFootPounds
public static final double newtonMetersToFootPounds(double newtonMeters)
Converts newton-meters to foot-pounds.- Parameters:
newtonMeters
- the torque value in newton-meters- Returns:
- double the torque value in foot-pounds
-
-