Java Random Int randomInt(double arg)

Here you can find the source of randomInt(double arg)

Description

random Int

License

Apache License

Declaration

static final public double randomInt(double arg) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

public class Main {
    static final public double randomInt(double arg) {
        double d = Math.ceil(Math.abs(arg));
        return 1 + Math.floor(d * Math.random());
    }// w  w w  .  j  av  a  2s.  c o m
}

Related

  1. randomDoubleMatrix(int rows, int columns)
  2. randomFloatInInterval(float lower, float upper)
  3. randomHex(int length)
  4. randomHexOfInt(int min, int max)
  5. randomInIntervall(float low, float high)
  6. randomInt(final int max)
  7. randomInt(final int min, final int max)
  8. randomInt(final int upToNotInclusive)
  9. randomInt(int ceil)