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

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.MathRint
All Implemented Interfaces:
Code, CountConvertible, Localizable, RealConvertible, java.io.Serializable, Theable

public class MathRint
extends AbstractMath
implements Theable, RealConvertible, CountConvertible

Math. the double value that is closest in value to the argument and is equal to a mathematical integer.

Example

 \the\mathrint 0.234
 \real7=\mathrint 0.56
 \real8=\mathrint\real7
 \count99=\mathrint 1.34
 

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
MathRint(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

MathRint

public MathRint(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