Packagecom.yworks.yfiles.geom
Classpublic class Angle
InheritanceAngle Inheritance YObject Inheritance Object

This class is an helper for angle calculation.



Public Methods
 MethodDefined By
  
Angle(init:Boolean = true)
Angle
  
addAngle(a1:Number, a2:Number):Number
[static] Returns the result of the addition of two angles between 0 and 2*Pi.
Angle
 Inherited
equals(o:Object):Boolean
YObject
  
getClass():Class
[override]
Angle
 Inherited
hashCode():int
YObject
  
[static]
Angle
  
normalizeAngle(angle:Number):Number
[static] Normalizes the given angle.
Angle
Protected Methods
 MethodDefined By
  
initAngle():void
Angle
Constructor Detail
Angle()Constructor
public function Angle(init:Boolean = true)



Parameters
init:Boolean (default = true)
Method Detail
addAngle()method
public static function addAngle(a1:Number, a2:Number):Number

Returns the result of the addition of two angles between 0 and 2*Pi. The result is calculated modulo 2Pi.

Parameters

a1:Number — a value in [0,2Pi).
 
a2:Number — a value in [0,2Pi).

Returns
Number — the sum of a1 and a2 modulo 2Pi.
getClass()method 
override public function getClass():Class

Returns
Class
initAngle()method 
protected final function initAngle():void

newAngle()method 
public static function newAngle():Angle

Returns
Angle
normalizeAngle()method 
public static function normalizeAngle(angle:Number):Number

Normalizes the given angle. The result is in [0,2Pi).

Parameters

angle:Number — angle to normalize

Returns
Number — the normalized angle