Sha256: c7d45f585ac95cf0dae7a0761ffea192025980b4a4699d6815c84f3040279820
Contents?: true
Size: 416 Bytes
Versions: 3
Compression:
Stored size: 416 Bytes
Contents
module GuiGeo module Tools include ::GuiGeo 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 clone_value(v) case v when Fixnum, Bignum, Float then v else v.clone end end class << self include GuiGeo::Tools end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
gui_geometry-0.3.1 | lib/gui_geometry/tools.rb |
gui_geometry-0.3.0 | lib/gui_geometry/tools.rb |
gui_geometry-0.2.2 | lib/gui_geometry/tools.rb |