Tabnine Logo
MathLib.random
Code IndexAdd Tabnine to your IDE (free)

How to use
random
method
in
javolution.lang.MathLib

Best Java code snippets using javolution.lang.MathLib.random (Showing top 4 results out of 315)

origin: javolution/javolution

/**
 * Returns a pseudo random <code>float</code> value in the range
 * <code>[min, max]</code> (fast and thread-safe without synchronization).
 * 
 * @param min the minimum value inclusive.
 * @param max the maximum value inclusive.
 * @return a pseudo random number in the range <code>[min, max]</code>.
 */
public static float random(float min, float max) {
  return (float) random((double) min, (double) max);
}
origin: javolution/javolution

/**
 * Returns a random number between zero and one.
 *  
 * @return  a <code>double</code> greater than or equal 
 *          to <code>0.0</code> and less than <code>1.0</code>.
 **/
public static double random() {
  return random(0, Integer.MAX_VALUE) * NORMALIZATION_FACTOR;
}
private static final double NORMALIZATION_FACTOR = -1.0 / Integer.MIN_VALUE;
origin: org.jscience/jscience

for (int i = 0; i < size; i++) {
  for (int j = 0; j < size; j++) {
    values[i][j] = MathLib.random();
for (int i = 0; i < size; i++) {
  for (int j = 0; j < size; j++) {
    complexes[i][j] = Complex.valueOf(MathLib.random(), MathLib
        .random());
  for (int j = 0; j < size; j++) {
    measures[i][j] = Amount.valueOf(
        MathLib.random(Long.MIN_VALUE, Long.MAX_VALUE), Unit.ONE);
origin: org.jscience/jscience

for (int i = 0; i < size; i++) {
  for (int j = 0; j < size; j++) {
    values[i][j] = MathLib.random();
javolution.langMathLibrandom

Javadoc

Returns a random number between zero and one.

Popular methods of MathLib

  • min
    Returns the smaller of two long values.
  • sqrt
    Returns the positive square root of the specified value.
  • abs
    Returns the absolute value of the specified long argument.
  • bitLength
    Returns the number of bits in the minimal two's-complement representation of the specified long, exc
  • exp
    Returns #E raised to the specified power.
  • floor
    Returns the largest (closest to positive infinity)double value that is not greater than the argument
  • log
    Returns the natural logarithm (base #E) of the specified value.
  • max
    Returns the greater of two long values.
  • pow
    Returns the value of the first argument raised to the power of the second argument.
  • round
    Returns the closest int to the specified argument.
  • toDoublePow10
    Returns the closest double representation of the specified long number multiplied by a power of ten.
  • toDoublePow2
    Returns the closest double representation of the specified long number multiplied by a power of two.
  • toDoublePow10,
  • toDoublePow2,
  • toLongPow10,
  • _atan,
  • _ieee754_exp,
  • _ieee754_log,
  • asin,
  • atan,
  • digitLength,
  • floorLog10

Popular in Java

  • Start an intent from android
  • getSharedPreferences (Context)
  • scheduleAtFixedRate (Timer)
  • getApplicationContext (Context)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JComboBox (javax.swing)
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now