lib/geometry/obround.rb in geometry-6.2 vs lib/geometry/obround.rb in geometry-6.3
- old
+ new
@@ -88,9 +88,15 @@
def center
min, max = @points.minmax {|a,b| a.y <=> b.y}
Point[(max.x+min.x)/2, (max.y+min.y)/2]
end
+ # @!attribute closed?
+ # @return [Bool] always true
+ def closed?
+ true
+ end
+
# @return [Array<Point>] The {Obround}'s four points (counterclockwise)
def points
point0, point2 = *@points
point1 = Point[point2.x, point0.y]
point3 = Point[point0.x, point2.y]