Class Doubles


  • public class Doubles
    extends java.lang.Object
    Utilities for manipulating double objects and values.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      Doubles()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double checkRange​(double value, double rangeMin, double rangeMax)
      Checks to make sure that a given value is within the given range.
      • Methods inherited from class java.lang.Object

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

      • Doubles

        public Doubles()
    • Method Detail

      • checkRange

        public static double checkRange​(double value,
                                        double rangeMin,
                                        double rangeMax)
        Checks to make sure that a given value is within the given range.
        Parameters:
        value - The value to check.
        rangeMin - The minimum range value, inclusive.
        rangeMax - The maximum range value, inclusive.
        Returns:
        The given value.
        Throws:
        java.lang.IllegalArgumentException - if the value is less than the range minimum or greater than the range maximum.