Sha256: bee974c485db3472571a57ade44025e8f085cb8d7baa944ea2b87d670d7a3edf

Contents?: true

Size: 115 Bytes

Versions: 16

Compression:

Stored size: 115 Bytes

Contents

# coding: utf-8
class Integer
  def hilbert?
    return false unless positive?
    ((self - 1) % 4) == 0
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
numb-0.186.0 lib/numb/hilbert.rb
numb-0.185.0 lib/numb/hilbert.rb
numb-0.184.0 lib/numb/hilbert.rb
numb-0.181.0 lib/numb/hilbert.rb
numb-0.170.0 lib/numb/hilbert.rb
numb-0.152.0 lib/numb/hilbert.rb
numb-0.138.0 lib/numb/hilbert.rb
numb-0.125.0 lib/numb/hilbert.rb
numb-0.114.0 lib/numb/hilbert.rb
numb-0.111.0 lib/numb/hilbert.rb
numb-0.109.0 lib/numb/hilbert.rb
numb-0.99.0 lib/numb/hilbert.rb
numb-0.96.0 lib/numb/hilbert.rb
numb-0.89.0 lib/numb/hilbert.rb
numb-0.84.0 lib/numb/hilbert.rb
numb-0.77.0 lib/numb/hilbert.rb