Java Random Int randomFloatInInterval(float lower, float upper)

Here you can find the source of randomFloatInInterval(float lower, float upper)

Description

random Float In Interval

License

Open Source License

Declaration

public static float randomFloatInInterval(float lower, float upper) 

Method Source Code

//package com.java2s;

public class Main {
    public static float randomFloatInInterval(float lower, float upper) {
        return (float) (Math.random() * (Math.abs(upper - lower)) + lower);
    }/*from   ww w  . j ava  2s. co  m*/
}

Related

  1. randomBytes(int size)
  2. randomBytes(int size)
  3. randomCommon(int min, int max, int n)
  4. randomCommonStr(int min, int max, int n)
  5. randomDoubleMatrix(int rows, int columns)
  6. randomHex(int length)
  7. randomHexOfInt(int min, int max)
  8. randomInIntervall(float low, float high)
  9. randomInt(double arg)