org.extex.interpreter.primitives.register.real
Class MathRound
java.lang.Object
org.extex.interpreter.type.AbstractCode
org.extex.interpreter.primitives.register.real.AbstractMath
org.extex.interpreter.primitives.register.real.MathRound
- All Implemented Interfaces:
- java.io.Serializable, CountConvertible, RealConvertible, Code, Theable
public class MathRound
- extends AbstractMath
- implements Theable, RealConvertible, CountConvertible
Math. The closest long to the argument, returned as real.
Example
\the\mathround 0.234
\real7=\mathround 0.56
\real8=\mathround\real7
\count99=\mathround 1.34
- Version:
- $Revision: 6447 $
- Author:
- Michael Niedermair
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.extex.interpreter.type.Theable |
the |
MathRound
public MathRound(CodeToken token)
- Creates a new object.
- Parameters:
token - the initial token for the primitive
calculate
protected Real calculate(Context context,
TokenSource source,
Typesetter typesetter)
throws ConfigurationException,
HelpingException,
TypesetterException
- Calculate
- Specified by:
calculate in class AbstractMath
- Parameters:
context - the contextsource - the token sourcetypesetter - the typesetter
- Returns:
- the real value
- Throws:
ConfigurationException - in case of an configuration error
HelpingException - in case of an error
TypesetterException - in case of an error in the typesetter- See Also:
AbstractMath.calculate(
org.extex.interpreter.context.Context,
org.extex.interpreter.TokenSource, org.extex.typesetter.Typesetter)