org.extex.interpreter.primitives.register.real
Class MathATanTwo
java.lang.Object
org.extex.interpreter.type.AbstractCode
org.extex.interpreter.primitives.register.real.AbstractMath
org.extex.interpreter.primitives.register.real.MathATanTwo
- All Implemented Interfaces:
- java.io.Serializable, CountConvertible, RealConvertible, Code, Theable
public class MathATanTwo
- extends AbstractMath
- implements Theable, RealConvertible, CountConvertible
Math. Converts rectangular coordinates (x, y) to polar (r, theta). This
computes the phase theta by computing an arc tangent of y/x in the range of
-pi to pi.
Example
\the\mathatantwo 0.234 0.34
\real7=\mathatantwo 0.56 0.34
\real8=\mathatantwo\real7\real8
\count99=\mathatantwo 1.34 0.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 |
MathATanTwo
public MathATanTwo(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)