Skip to content

Commit 64c8f8a

Browse files
committed
minmax
1 parent fd19af9 commit 64c8f8a

File tree

1 file changed

+2
-2
lines changed
  • library/vecmath/vec2d/library/lenny/lib

1 file changed

+2
-2
lines changed

library/vecmath/vec2d/library/lenny/lib/rect.rb

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ def centroid
1111
end
1212

1313
def contains?(vec)
14-
xminmax = [vec1.x, vec2.x]
15-
yminmax = [vec1.y, vec2.y]
14+
xminmax = [vec1.x, vec2.x].minmax
15+
yminmax = [vec1.y, vec2.y].minmax
1616
return false if vec.x < xminmax[0]
1717
return false if vec.x > xminmax[1]
1818
return false if vec.y < yminmax[0]

0 commit comments

Comments
 (0)