Java ThreadLocalRandom randomReal(float range)

Here you can find the source of randomReal(float range)

Description

random Real

License

Open Source License

Declaration

public static float randomReal(float range) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import java.util.concurrent.ThreadLocalRandom;

public class Main {
    public static float randomReal(float range) {
        ThreadLocalRandom rand = ThreadLocalRandom.current();
        return (rand.nextFloat() - rand.nextFloat()) * range;
    }/*from  www .  jav a2s.  co  m*/
}

Related

  1. randomLongs(final long count, final long min, final long max)
  2. randomLongsNonDuplicates(final long count, final long min, final long max)
  3. randomNum(int min, int max)
  4. randomNums(int min, int max, int count)
  5. randomPer(long num, long divisor)
  6. randomSeed()
  7. randomString()
  8. RandomString(int length)
  9. randomString(int minLength, int maxLength)