Class DecimalScaleFactor.DownSmall

    • Field Detail

      • longDivisor

        private final transient long longDivisor
    • Constructor Detail

      • DownSmall

        public DownSmall​(int powerOf10,
                         long divisor)
    • Method Detail

      • targetValue

        public long targetValue​(long srcNumericalValue)
        Specified by:
        targetValue in interface IScalarAffineTransform
        Overrides:
        targetValue in class DecimalScaleFactor
        Parameters:
        srcNumericalValue - a numerical quantity value, expressed in the source unit
        Returns:
        the corresponding numerical quantity value, when expressed in the target unit, rounded to the closest integer that can be represented by a long
      • targetFloor

        public long targetFloor​(long srcNumericalValue)
        Specified by:
        targetFloor in interface IScalarAffineTransform
        Overrides:
        targetFloor in class DecimalScaleFactor
        Parameters:
        srcNumericalValue - a numerical quantity value, expressed in the source unit
        Returns:
        the floor of the corresponding numerical quantity value, when expressed in the target unit, clamped to a long