JDK 9 RFR of 4477961: java.lang.Math.toDegrees(double) could be optimized

Martin Desruisseaux martin.desruisseaux at geomatys.fr
Tue Sep 23 19:36:35 UTC 2014


Hi Brian

Le 23/09/14 00:34, Brian Burkhalter a écrit :
> I created an alternate webrev using compile-time constants per your suggestion:
>
> http://cr.openjdk.java.net/~bpb/4477961/webrev.01/

On a very minor formatting detail, the change in StrictMath has a
misplaced empty line (before the RADIANS_TO_DEGREES constant, while it
should be after).

Also, would it be worth to remove the "private" modifier in
StrictMath.DEGREES_TO_RADIANS and StrictMath.RADIANS_TO_DEGREES, and
have Math.toDegrees and Math.toRadians to use the StrictMath constants
instead than duplicating them? It would reduce slightly the size of the
Math.class file by avoiding 2 field declarations.

    Martin





More information about the core-libs-dev mailing list