Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-1555

Wrong declaration of ATan2 class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.0
    • None
    • None
    • Patch, Important

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            lgallucc Laurent Galluccio
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1m
                1m
                Remaining:
                Remaining Estimate - 1m
                1m
                Logged:
                Time Spent - Not Specified
                Not Specified