Here you can find the source of radiancheck(double x)
Parameter | Description |
---|---|
x | double containing angle in radians |
public static double radiancheck(double x)
//package com.java2s; public class Main { /** 2*PI./*from www . j a va 2 s . co m*/ */ public final static double TWOPI = 2.0 * Math.acos(-1.0); /** Returns an angle between 0 and 2 pi * @param x double containing angle in radians * @return an angle between 0 and 2 pi */ public static double radiancheck(double x) { x = Modulo(x, TWOPI); if (x < 0.0) x = x + TWOPI; return x; } /** Modulo function * @return the Modulo */ public static double Modulo(double x, double y) { return y * Frac(x / y); } /** Fractional part of a number (y=x-[x]) * @return fractional part of a number */ public static double Frac(double x) { return x - Math.floor(x); } }