From 0563022a206294757effa44686727bffc4f7c2bd Mon Sep 17 00:00:00 2001 From: Andrew John Hughes Date: Fri, 23 Mar 2012 15:19:26 +0000 Subject: Merge GNU Classpath 0.99 into libjava. From-SVN: r185741 --- .../classpath/vm/reference/java/lang/VMMath.java | 53 +++++++++++----------- 1 file changed, 27 insertions(+), 26 deletions(-) (limited to 'libjava/classpath/vm/reference/java/lang/VMMath.java') diff --git a/libjava/classpath/vm/reference/java/lang/VMMath.java b/libjava/classpath/vm/reference/java/lang/VMMath.java index dc5fd420708..35c3f645e42 100644 --- a/libjava/classpath/vm/reference/java/lang/VMMath.java +++ b/libjava/classpath/vm/reference/java/lang/VMMath.java @@ -1,5 +1,5 @@ /* VMMath.java -- Common mathematical functions. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2010 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -40,7 +40,7 @@ package java.lang; import gnu.classpath.Configuration; -class VMMath +final class VMMath { static @@ -51,6 +51,8 @@ class VMMath } } + private VMMath() {} // Prohibits instantiation. + /** * The trigonometric function sin. The sine of NaN or infinity is * NaN, and the sine of 0 retains its sign. This is accurate within 1 ulp, @@ -59,7 +61,7 @@ class VMMath * @param a the angle (in radians) * @return sin(a) */ - public static native double sin(double a); + static native double sin(double a); /** * The trigonometric function cos. The cosine of NaN or infinity is @@ -68,7 +70,7 @@ class VMMath * @param a the angle (in radians) * @return cos(a) */ - public static native double cos(double a); + static native double cos(double a); /** * The trigonometric function tan. The tangent of NaN or infinity @@ -78,7 +80,7 @@ class VMMath * @param a the angle (in radians) * @return tan(a) */ - public static native double tan(double a); + static native double tan(double a); /** * The trigonometric function arcsin. The range of angles returned @@ -89,7 +91,7 @@ class VMMath * @param a the sin to turn back into an angle * @return arcsin(a) */ - public static native double asin(double a); + static native double asin(double a); /** * The trigonometric function arccos. The range of angles returned @@ -100,7 +102,7 @@ class VMMath * @param a the cos to turn back into an angle * @return arccos(a) */ - public static native double acos(double a); + static native double acos(double a); /** * The trigonometric function arcsin. The range of angles returned @@ -112,7 +114,7 @@ class VMMath * @return arcsin(a) * @see #atan2(double, double) */ - public static native double atan(double a); + static native double atan(double a); /** * A special version of the trigonometric function arctan, for @@ -161,7 +163,7 @@ class VMMath * @return theta in the conversion of (x, y) to (r, theta) * @see #atan(double) */ - public static native double atan2(double y, double x); + static native double atan2(double y, double x); /** * Take ea. The opposite of log(). If the @@ -175,7 +177,7 @@ class VMMath * @see #log(double) * @see #pow(double, double) */ - public static native double exp(double a); + static native double exp(double a); /** * Take ln(a) (the natural log). The opposite of exp(). If the @@ -191,7 +193,7 @@ class VMMath * @return the natural log of a * @see #exp(double) */ - public static native double log(double a); + static native double log(double a); /** * Take a square root. If the argument is NaN or negative, the result is @@ -205,7 +207,7 @@ class VMMath * @return the square root of the argument * @see #pow(double, double) */ - public static native double sqrt(double a); + static native double sqrt(double a); /** * Raise a number to a power. Special cases: