Interface Scale

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      double fromStandardUnit​(double value)
      Convert a value from an SI value to a value in the unit that uses this scale.
      boolean isBaseSIScale()
      Return whether a scale is a 'standard' scale that would belong to an SI unit.
      double toStandardUnit​(double value)
      Convert a value to an SI value using this scale.
    • Method Detail

      • toStandardUnit

        double toStandardUnit​(double value)
        Convert a value to an SI value using this scale.
        Parameters:
        value - double; the value to convert
        Returns:
        the corresponding SI value
      • fromStandardUnit

        double fromStandardUnit​(double value)
        Convert a value from an SI value to a value in the unit that uses this scale.
        Parameters:
        value - double; the value to convert
        Returns:
        the corresponding value in the given unit
      • isBaseSIScale

        boolean isBaseSIScale()
        Return whether a scale is a 'standard' scale that would belong to an SI unit. For a linear scale, any scale with conversion factor 1 would be considered standard. For an offset scale, it would be considered standard if the offset is 0 and the conversion factor is 1.
        Returns:
        boolean; whether the scale is a 'standard' scale that would belong to an SI unit.