Java Double Number mod modPI2(double angle)

Here you can find the source of modPI2(double angle)

Description

mod PI

License

Open Source License

Declaration

public static double modPI2(double angle) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

public class Main {
    public static double modPI2(double angle) {
        while (angle < -Math.PI)
            angle += 2.0 * Math.PI;

        while (angle > Math.PI)
            angle -= 2.0 * Math.PI;

        return angle;
    }/*  w  w  w .j a va  2  s  .c om*/
}

Related

  1. mod2pi_pos(double vin)
  2. modArray(double value, int mod, int div)
  3. modifiedGramSchmidt(double[][] s)
  4. modifiedJulianToJulian(double modifiedJulian)
  5. modifySize(double[] x, int newLen)
  6. Modulo(double x, double y)
  7. modulo10(double d, boolean round)
  8. moduloAngle(double angle)
  9. moduloTwoPI(double x)