Sha256: 4142497cdd1b04997679ed43cb760f4595f4d492a9ab28447fad99de9a3d1a62
Contents?: true
Size: 361 Bytes
Versions: 1
Compression:
Stored size: 361 Bytes
Contents
module GuiGeometry module Tools def min(a,b) a < b ? a : b; end def max(a,b) a > b ? a : b; end def minmax(a,b) if a <= b return a, b else return b, a end end def bound(a,bounded,c) max(a,min(bounded,c)); end def point(*args); GuiGeometry::Point.new *args end def rect(*args); GuiGeometry::Rectangle.new *args end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gui_geometry-0.0.5 | lib/gui_geometry/tools.rb |