Class DoubleUtils


  • public class DoubleUtils
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      DoubleUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double normalize​(double value, double minValue, double maxValue, double minNormalized, double maxNormalized, boolean invert)
      Normalize a value to a range - normalize values between [100, 1000] to range [0, 1].
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DoubleUtils

        public DoubleUtils()
    • Method Detail

      • normalize

        public static double normalize​(double value,
                                       double minValue,
                                       double maxValue,
                                       double minNormalized,
                                       double maxNormalized,
                                       boolean invert)
        Normalize a value to a range - normalize values between [100, 1000] to range [0, 1].
        Parameters:
        value - the value to be normalized
        minValue - the minimum possible value (e.g. "200")
        maxValue - the maximum possible value (e.g. "1000")
        minNormalized - the minimum normalized value (e.g. "0")
        maxNormalized - the maximum normalized value (e.g. "1")
        invert - invert the normalization, i.e. 1000 is mapped to 0 and 200 is mapped to 1
        Returns: