diff options
Diffstat (limited to 'src/jogl/classes/com/jogamp/opengl/math')
-rw-r--r-- | src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java index 8b3b9dbf1..7aba7fa73 100644 --- a/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java +++ b/src/jogl/classes/com/jogamp/opengl/math/FloatUtil.java @@ -2129,6 +2129,16 @@ public final class FloatUtil { /** The value PI^2. */ public final static float SQUARED_PI = PI * PI; + /** Converts arc-degree to radians */ + public static float adegToRad(final float arc_degree) { + return arc_degree * PI / 180.0f; + } + + /** Converts radians to arc-degree */ + public static float radToADeg(final float rad) { + return rad * 180.0f / PI; + } + /** * Epsilon for floating point {@value}, as once computed via {@link #getMachineEpsilon()} on an AMD-64 CPU. * <p> |