Search this API

y.geom
Class Angle

java.lang.Object
  extended by y.geom.Angle

public class Angle
extends java.lang.Object

This class is an helper for angle calculation.

 

Constructor Summary
Angle()
           
 
Method Summary
static double addAngle(double a1, double a2)
          Returns the result of the addition of two angles between 0 and 2*Pi.
static double normalizeAngle(double angle)
          Normalizes the given angle.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Angle

public Angle()
Method Detail

addAngle

public static double addAngle(double a1,
                              double a2)
Returns the result of the addition of two angles between 0 and 2*Pi. The result is calculated modulo 2*Pi.

Parameters:
a1 - a value in [0,2Pi).
a2 - a value in [0,2Pi).
Returns:
The sum of a1 and a2 modulo 2*Pi.

normalizeAngle

public static double normalizeAngle(double angle)
Normalizes the given angle. The result is in [0,2Pi).

Parameters:
angle - angle to normalize
Returns:
the normalized angle

© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.