Interface AngleUtil


public interface AngleUtil
Utilities for Angles, such as normalization between 0 and 2 * PI.

Copyright (c) 2013-2019 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See OpenTrafficSim License.

Author:
Alexander Verbraeck, Peter Knoppers
  • Method Summary

    Static Methods 
    Modifier and Type Method Description
    static double normalize​(double angle)
    Normalize an angle between 0 and 2 * PI.
    static float normalize​(float angle)
    Normalize an angle between 0 and 2 * PI.
    static Angle normalize​(Angle angle)
    Normalize an angle between 0 and 2 * PI.
    static FloatAngle normalize​(FloatAngle angle)
    Normalize an angle between 0 and 2 * PI.
  • Method Details

    • normalize

      static double normalize​(double angle)
      Normalize an angle between 0 and 2 * PI.
      Parameters:
      angle - double; original angle.
      Returns:
      angle between 0 and 2 * PI.
    • normalize

      static float normalize​(float angle)
      Normalize an angle between 0 and 2 * PI.
      Parameters:
      angle - float; original angle.
      Returns:
      angle between 0 and 2 * PI.
    • normalize

      static Angle normalize​(Angle angle)
      Normalize an angle between 0 and 2 * PI.
      Parameters:
      angle - Angle; original angle.
      Returns:
      Angle; a new Angle object with angle between 0 and 2 * PI.
    • normalize

      static FloatAngle normalize​(FloatAngle angle)
      Normalize an angle between 0 and 2 * PI.
      Parameters:
      angle - FloatAngle; original angle.
      Returns:
      angle between 0 and 2 * PI.