Formula 1.0.0

hirondelle.formula.function.builtin
Class RandomNumber

Object
  extended by hirondelle.formula.function.builtin.RandomNumber
All Implemented Interfaces:
Function

public final class RandomNumber
extends Object
implements Function

rand(x): a pseudo-random number in a certain range.


Constructor Summary
RandomNumber()
           
 
Method Summary
 Decimal calculate(Decimal... aArgs)
          Takes either 0 or 2 arguments.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RandomNumber

public RandomNumber()
Method Detail

calculate

public Decimal calculate(Decimal... aArgs)
Takes either 0 or 2 arguments.

For 0 arguments, returns a random number >= 0 and < 1

For 2 arguments, the first argument is the lower limit (inclusive) and the second argument is the upper limit (inclusive) for the return value.

Specified by:
calculate in interface Function
Parameters:
aArgs - 0 or more arguments to the function.

Formula 1.0.0

Copyright Hirondelle Systems. Published January 31, 2013