Class AsaUnits


  • public class AsaUnits
    extends Object
    • Constructor Detail

      • AsaUnits

        public AsaUnits()
    • Method Detail

      • convertSpeed

        public static double convertSpeed​(AsaUnits.SpeedType fromUnits,
                                          AsaUnits.SpeedType toUnits,
                                          double speed)
        Converts the given speed from the units fromUnits to the units specified by toUnit
        Parameters:
        fromUnits - an enumeration specifying the unit type of speed
        toUnits - an enumeration specifying the units to convert speed to
        speed - a double value to convert to the given units
        Returns:
        the number given by speed converted from one unit to another
      • convertSpeed

        public static double[] convertSpeed​(AsaUnits.SpeedType fromUnits,
                                            AsaUnits.SpeedType toUnits,
                                            double[] speed)
        Converts the given speed array from the units fromUnits to the units specified by toUnit
        Parameters:
        fromUnits - an enumeration specifying the unit type of speed
        toUnits - an enumeration specifying the units to convert speed to
        speed - a double[] of values to convert to the given units
        Returns:
        the numbers given by speed converted from one unit to another
      • convertDistance

        public static double convertDistance​(AsaUnits.DistanceType fromUnits,
                                             AsaUnits.DistanceType toUnits,
                                             double distance)
        Converts the given distance from the units fromUnits to the units specified by toUnit
        Parameters:
        fromUnits - an enumeration specifying the unit type of distance
        toUnits - an enumeration specifying the units to convert distance to
        distance - a double value to convert to the given units
        Returns:
        the number given by distance converted from one unit to another
      • convertDistance

        public static double[] convertDistance​(AsaUnits.DistanceType fromUnits,
                                               AsaUnits.DistanceType toUnits,
                                               double[] distance)
        Converts the given distance array from the units fromUnits to the units specified by toUnit
        Parameters:
        fromUnits - an enumeration specifying the unit type of distance
        toUnits - an enumeration specifying the units to convert distance to
        distance - a double[] value to convert to the given units
        Returns:
        the numbers given by distance converted from one unit to another