Sha256: 4c08435184c072aa66850b283677f61352360ab56c035ef30ec7ed70e85f171e

Contents?: true

Size: 292 Bytes

Versions: 32

Compression:

Stored size: 292 Bytes

Contents

# frozen_string_literal: true
# Re-open Numeric so that we can do simple degree and radian conversions
# conversion factors are 180 / Math::PI and Math::PI / 180

class Numeric #:nodoc:
  def degrees
    self * 57.29577951308232
  end

  def radians
    self * 0.017453292519943295
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
jruby_art-2.2.2 lib/jruby_art/helpers/numeric.rb
jruby_art-2.2.1 lib/jruby_art/helpers/numeric.rb
jruby_art-2.2.0 lib/jruby_art/helpers/numeric.rb
jruby_art-1.7.0 lib/jruby_art/helpers/numeric.rb
jruby_art-2.1.0.pre lib/jruby_art/helpers/numeric.rb
jruby_art-2.0.0.pre lib/jruby_art/helpers/numeric.rb
jruby_art-1.6.4 lib/jruby_art/helpers/numeric.rb
jruby_art-1.6.3 lib/jruby_art/helpers/numeric.rb
jruby_art-1.6.2 lib/jruby_art/helpers/numeric.rb
jruby_art-1.6.1 lib/jruby_art/helpers/numeric.rb
jruby_art-1.6.0 lib/jruby_art/helpers/numeric.rb
jruby_art-1.5.2 lib/jruby_art/helpers/numeric.rb
jruby_art-1.5.1 lib/jruby_art/helpers/numeric.rb
jruby_art-1.5.0 lib/jruby_art/helpers/numeric.rb
jruby_art-1.4.9 lib/jruby_art/helpers/numeric.rb
jruby_art-1.4.8 lib/jruby_art/helpers/numeric.rb
jruby_art-1.4.7 lib/jruby_art/helpers/numeric.rb
jruby_art-1.4.6 lib/jruby_art/helpers/numeric.rb
jruby_art-1.4.5 lib/jruby_art/helpers/numeric.rb
jruby_art-1.4.4 lib/jruby_art/helpers/numeric.rb