Class CRandomUtil.Double

  • Enclosing class:
    CRandomUtil

    public static class CRandomUtil.Double
    extends java.lang.Object
    Random generator functions to generate random Double values.
    • Constructor Summary

      Constructors 
      Constructor Description
      Double()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static double getNext()
      Returns a random double within 0 - Double.MAX_VALUE
      static double getNext​(double startInclusive, double endInclusive)
      Returns a random double within the specified range.
      • Methods inherited from class java.lang.Object

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

      • Double

        public Double()
    • Method Detail

      • getNext

        public static double getNext​(double startInclusive,
                                     double endInclusive)

        Returns a random double within the specified range.

        Parameters:
        startInclusive - the smallest value that can be returned, must be non-negative
        endInclusive - the upper bound (included)
        Returns:
        the random double
        Throws:
        java.lang.IllegalArgumentException - if startInclusive > endInclusive or if startInclusive is negative
      • getNext

        public static double getNext()

        Returns a random double within 0 - Double.MAX_VALUE

        Returns:
        the random double
        See Also:
        getNext(double, double)