Sha256: cf1462417ab667961a26ababf6e337f4f4bd992f67cb3b87efd936289a3c0362

Contents?: true

Size: 125 Bytes

Versions: 12

Compression:

Stored size: 125 Bytes

Contents

class Range #:nodoc:
  def clip(n)
    if cover?(n)
      n
    elsif n < min
      min
    else
      max
    end
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
jruby_art-0.2.6.pre lib/jruby_art/helpers/range.rb
ruby-processing-2.6.8 lib/ruby-processing/helpers/range.rb
jruby_art-0.2.4.pre lib/jruby_art/helpers/range.rb
jruby_art-0.2.3.pre lib/jruby_art/helpers/range.rb
jruby_art-0.2.2.pre lib/jruby_art/helpers/range.rb
jruby_art-0.2.1.pre lib/jruby_art/helpers/range.rb
ruby-processing-2.6.7 lib/ruby-processing/helpers/range.rb
jruby_art-0.2.0.pre lib/jruby_art/helpers/range.rb
ruby-processing-2.6.6 lib/ruby-processing/helpers/range.rb
ruby-processing-2.6.5 lib/ruby-processing/helpers/range.rb
ruby-processing-2.6.4 lib/ruby-processing/helpers/range.rb
ruby-processing-2.6.3 lib/ruby-processing/helpers/range.rb