bfoz / geometry

Geometric primitives for Ruby
https://rubygems.org/gems/geometry
BSD 2-Clause "Simplified" License
47 stars 18 forks source link

Circle#minmax does the wrong thing when center is a PointZero #57

Closed bfoz closed 10 years ago

bfoz commented 11 years ago

PointZero + @radius generates a Numeric when it should be generating a Point.

bfoz commented 10 years ago

The problem was that PointZero + Numeric resulted in another Numeric, instead of a Point, because there was no way to know what size to make the Point. Fixed by creating the PointIso class. Now adding a Numeric to a PointZero yields a PointIso with the same value as the Numeric.