java.lang.Object
ortus.boxlang.runtime.bifs.BIF
ortus.boxlang.runtime.bifs.global.math.Rand

@BoxBIF public class Rand extends BIF
  • Constructor Details

    • Rand

      public Rand()
      Constructor
  • Method Details

    • _invoke

      public Object _invoke(IBoxContext context, ArgumentsScope arguments)
      Return a random double between 0 and 1
      Specified by:
      _invoke in class BIF
      Parameters:
      context - The context in which the BIF is being invoked.
      arguments - Argument scope for the BIF.
      Returns:
      The result of the invocation
    • _invoke

      public static double _invoke(Long seed)
      Return a random double between 0 and 1
      Parameters:
      seed - The seed to use for the random number generator
      Returns:
      A random double between 0 and 1
    • _invoke

      public double _invoke(String algorithm, Long seed)
      Return a random double between 0 and 1
      Parameters:
      algorithm - The algorithm to use to generate the random number.
      seed - The seed to use for the random number generator
      Returns:
      A random double between 0 and 1