nl.tudelft.simulation.language.d2
Class Angle

java.lang.Object
  extended bynl.tudelft.simulation.language.d2.Angle

public final class Angle
extends java.lang.Object


(c) copyright 2003-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Version:
Jun 13, 2004
Author:
Alexander Verbraeck

Method Summary
static double angle(java.awt.geom.Point2D p0, java.awt.geom.Point2D p1)
          Return the 2-pi normalized angle when making an arc from p0 to p1
static double normalize2Pi(double angle)
          Normalize an angle between 0 and 2*pi
static double normalizePi(double angle)
          Normalize an angle between -pi and +pi
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

normalize2Pi

public static double normalize2Pi(double angle)
Normalize an angle between 0 and 2*pi

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

normalizePi

public static double normalizePi(double angle)
Normalize an angle between -pi and +pi

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

angle

public static double angle(java.awt.geom.Point2D p0,
                           java.awt.geom.Point2D p1)
Return the 2-pi normalized angle when making an arc from p0 to p1

Parameters:
p0 - first point
p1 - second point
Returns:
the normalized angle


Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.