JADE v6.1

com.dautelle.physics
Class Angle

java.lang.Object
  extended byjava.lang.Number
      extended bycom.dautelle.math.numbers.RealtimeNumber
          extended bycom.dautelle.physics.Quantity
              extended bycom.dautelle.physics.Angle
All Implemented Interfaces:
java.lang.Comparable, Operable, Realtime, Representable, java.io.Serializable

public class Angle
extends Quantity

This class represents the figure formed by two lines diverging from a common point. The system unit for this quantity is "rad" (Système International d'Unités).

Version:
4.1, February 10, 2003
Author:
Jean-Marie Dautelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.dautelle.physics.Quantity
Quantity.Factory, Quantity.Value
 
Field Summary
static Angle ZERO
          Represents a Angle amounting to nothing.
 
Constructor Summary
protected Angle()
          Default constructor (allows for derivation).
 
Method Summary
static Angle angleOf(Quantity quantity)
          Returns the Angle corresponding to the specified quantity.
static Angle atan2(Quantity y, Quantity x)
          Converts rectangular coordinates (xy) to polar (ρ, θ).
 Angle bounded()
          Returns an Angle in the range of -π through π (system unit) by removing or adding a discrete number of revolution to this angle.
 Scalar cos()
          Returns the trigonometric cosine of this Angle.
static void showAs(Unit unit)
          Shows Angle instances in the specified unit.
 Scalar sine()
          Returns the trigonometric sine of this Angle.
 Scalar tan()
          Returns the trigonometric tangent of this Angle.
 
Methods inherited from class com.dautelle.physics.Quantity
abs, add, appendTo, approxEquals, approxEquals, compareTo, divide, divide, doubleValue, doubleValue, equals, floatValue, floatValue, getAbsoluteError, getMaximum, getMinimum, getOutputUnit, getRelativeError, getSystemUnit, hashCode, intValue, intValue, inverse, isPossiblyZero, longValue, longValue, multiply, multiply, negate, opposite, plus, pow, random, reciprocal, root, subtract, times, toString, toString, toXml, valueOf, valueOf, valueOf, valueOf
 
Methods inherited from class com.dautelle.math.numbers.RealtimeNumber
clone, export, isLocalObject, isPoolObject, pow, recycle, toHeap
 
Methods inherited from class java.lang.Number
byteValue, shortValue
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ZERO

public static final Angle ZERO
Represents a Angle amounting to nothing.

Constructor Detail

Angle

protected Angle()
Default constructor (allows for derivation).

Method Detail

angleOf

public static Angle angleOf(Quantity quantity)
Returns the Angle corresponding to the specified quantity.

Parameters:
quantity - a quantity compatible with Angle.
Returns:
the specified quantity or a new Angle instance.
Throws:
ConversionException - if the current model does not allow the specified quantity to be converted to Angle.

showAs

public static void showAs(Unit unit)
Shows Angle instances in the specified unit.

Parameters:
unit - the output unit for Angle instances.
See Also:
Quantity.getOutputUnit()

atan2

public static Angle atan2(Quantity y,
                          Quantity x)
Converts rectangular coordinates (xy) to polar (ρ, θ). This method computes the phase θ by computing an arc tangent of y/x.

Parameters:
y - y coordinate
x - x coordinate
Returns:
the θ component of the point (ρθ) in polar coordinates that corresponds to the point(xy) in Cartesian coordinates.
Throws:
java.lang.IllegalArgumentException - x and y represent quantities of different nature (system units are different).

sine

public Scalar sine()
Returns the trigonometric sine of this Angle.

Returns:
the sine of this angle.

cos

public Scalar cos()
Returns the trigonometric cosine of this Angle.

Returns:
the cosine of this angle.

tan

public Scalar tan()
Returns the trigonometric tangent of this Angle.

Returns:
the tangent of this angle.

bounded

public Angle bounded()
Returns an Angle in the range of -π through π (system unit) by removing or adding a discrete number of revolution to this angle.

Returns:
an angle in the the range of -π through π

JADE v6.1

Copyright © 2004 Jean-Marie Dautelle.