de.dante.extex.interpreter.primitives.register.real
Class MathRandom

java.lang.Object
  extended byde.dante.extex.interpreter.type.AbstractCode
      extended byde.dante.extex.interpreter.primitives.register.real.AbstractMath
          extended byde.dante.extex.interpreter.primitives.register.real.MathRandom
All Implemented Interfaces:
Code, CountConvertible, Localizable, RealConvertible, java.io.Serializable, Theable

public class MathRandom
extends AbstractMath
implements Theable, RealConvertible, CountConvertible

Math. a real value with a positive sign, greater than or equal to 0.0 and less than 1.0.

Example

 \the\mathrandom
 \real7=\mathrandom
 

Version:
$Revision: 1.5 $
Author:
Michael Niedermair
See Also:
Serialized Form

Field Summary
 
Fields inherited from class de.dante.extex.interpreter.type.AbstractCode
serialVersionUID
 
Constructor Summary
MathRandom(java.lang.String name)
          Creates a new object.
 
Method Summary
protected  Real calculate(Context context, TokenSource source)
          Calculate
 
Methods inherited from class de.dante.extex.interpreter.primitives.register.real.AbstractMath
convertCount, convertReal, execute, the
 
Methods inherited from class de.dante.extex.interpreter.type.AbstractCode
enableLocalization, getLocalizer, getName, isIf, isOuter, printable, printableControlSequence, readResolve, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface de.dante.extex.interpreter.type.Theable
the
 
Methods inherited from interface de.dante.extex.interpreter.type.real.RealConvertible
convertReal
 
Methods inherited from interface de.dante.extex.interpreter.type.count.CountConvertible
convertCount
 

Constructor Detail

MathRandom

public MathRandom(java.lang.String name)
           throws GeneralException
Creates a new object.

Parameters:
name - the name for debugging
Throws:
GeneralException - ...
Method Detail

calculate

protected Real calculate(Context context,
                         TokenSource source)
                  throws InterpreterException
Calculate

Specified by:
calculate in class AbstractMath
Parameters:
context - the context
source - the tokensource
Returns:
the real value
Throws:
InterpreterException - if a error occoured