Package micycle.pgs.commons
Class FastAtan2
java.lang.Object
micycle.pgs.commons.FastAtan2
Fast, high-quality polynomial-based atan2 approximation.
- Author:
- Michael Carleton
-
Method Summary
-
Method Details
-
atan2
public static double atan2(double y, double x) Maximum absolute error of ~0.00085 rad (~0.049º).- Returns:
- Angle from x axis positive side to (x,y) position, in radians, in [-PI,PI].
-
atan2
public static float atan2(float y, float x) Maximum absolute error of 0.0015 rad (0.086º).- Returns:
- Angle from x axis positive side to (x,y) position, in radians, in [-PI,PI].
-