Module org.dyn4j
Package org.dyn4j

Class 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
    • 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