bfoz / geometry

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

Add Polyline#close and Polyline#close! #61

Closed bfoz closed 11 years ago

bfoz commented 11 years ago

close returns a new Polyline that's closed.

close! closes the receiver and returns it

bfoz commented 11 years ago

Overrode close in Polygon so that it returns self. Polygons are always closed, so close would have become an alias of clone, which seemed silly. Calling close! on a Polygon tends to be pointless, but it works as expected.