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

PolygonsSet.getBarycenter() returns incorrect value for empty region

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.0, 3.6
    • 4.0
    • None
    • None

    Description

      The o.a.c.m.geometry.euclidean.twod.PolygonsSet.getBarycenter() method returns the point (0, 0) when the region is empty. It should return (NaN, NaN) since the barycenter does not exist. This is the behavior of IntervalsSet and PolyhedronsSet.

       

      Pull request: https://github.com/apache/commons-math/pull/80

      Attachments

        Activity

          People

            Unassigned Unassigned
            mattjuntunen Matt Juntunen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: