Sha256: 83ef0735261140f82eaea1a76a3f975fd6f2b587f0ff4004ef070009802a1140

Contents?: true

Size: 311 Bytes

Versions: 8

Compression:

Stored size: 311 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: false
# 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

8 entries across 8 versions & 1 rubygems

Version Path
jruby_art-1.2.5 lib/jruby_art/helpers/numeric.rb
jruby_art-1.2.4 lib/jruby_art/helpers/numeric.rb
jruby_art-1.2.3 lib/jruby_art/helpers/numeric.rb
jruby_art-1.2.2 lib/jruby_art/helpers/numeric.rb
jruby_art-1.2.1 lib/jruby_art/helpers/numeric.rb
jruby_art-1.2.0.pre lib/jruby_art/helpers/numeric.rb
jruby_art-1.1.3 lib/jruby_art/helpers/numeric.rb
jruby_art-1.1.2 lib/jruby_art/helpers/numeric.rb