Class IdentityScale

    • Field Detail

      • SCALE

        public static final IdentityScale SCALE
        A ready-to-use instance of the standard scale (they are all the same...).
    • Method Detail

      • toStandardUnit

        public double toStandardUnit​(double value)
        Convert a value to an SI value using this scale.
        Specified by:
        toStandardUnit in interface Scale
        Overrides:
        toStandardUnit in class LinearScale
        Parameters:
        value - double; the value to convert
        Returns:
        the corresponding SI value
      • fromStandardUnit

        public double fromStandardUnit​(double value)
        Convert a value from an SI value to a value in the unit that uses this scale.
        Specified by:
        fromStandardUnit in interface Scale
        Overrides:
        fromStandardUnit in class LinearScale
        Parameters:
        value - double; the value to convert
        Returns:
        the corresponding value in the given unit