StrictMath.java (toDegrees): Multiply before dividing.
* java/lang/StrictMath.java (toDegrees): Multiply before dividing. (toRadians): Likewise. 2003-10-08 C. Brian Jones <cbj@gnu.org> * java/lang/Math.java (toRadians): multiply before dividing to reduce decimal error (toDegrees): ditto From-SVN: r72238
This commit is contained in:
parent
f06c07c7b8
commit
d791274435
3 changed files with 22 additions and 4 deletions
|
@ -1213,7 +1213,7 @@ public final strictfp class StrictMath
|
|||
*/
|
||||
public static double toRadians(double degrees)
|
||||
{
|
||||
return degrees * (PI / 180);
|
||||
return (degrees * PI) / 180;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1226,7 +1226,7 @@ public final strictfp class StrictMath
|
|||
*/
|
||||
public static double toDegrees(double rads)
|
||||
{
|
||||
return rads * (180 / PI);
|
||||
return (rads * 180) / PI;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue