You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Laurent Galluccio (Jira)" <ji...@apache.org> on 2020/10/07 10:03:00 UTC

[jira] [Created] (MATH-1555) Wrong declaration of ATan2 class

Laurent Galluccio created MATH-1555:
---------------------------------------

             Summary: Wrong declaration of ATan2 class
                 Key: MATH-1555
                 URL: https://issues.apache.org/jira/browse/MATH-1555
             Project: Commons Math
          Issue Type: Bug
            Reporter: Laurent Galluccio


If i check the content of ATan2 class, the value method is coded like this 

public double value(double x, double y) {
 return FastMath.atan2(x, y);
 }

with 

*x* Abscissa for which the function value should be computed.

*y* Ordinate for which the function value should be computed.

 

But the FastMath.atan2 method is declared like this 

/**
 * Two arguments arctangent function
 * @param y ordinate
 * @param x abscissa
 * @return phase angle of point (x,y) between \{@code -PI} and \{@code PI}
 */
 public static double atan2(double y, double x) 

 

Which means that ordinate and abscissa are inverted. This should be fixed.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)