Sha256: 7bfac96a9babe5c2f03b721f66a534ce7fbedfb47428a0486d0ab25606d53b8d

Contents?: true

Size: 232 Bytes

Versions: 8

Compression:

Stored size: 232 Bytes

Contents

require 'mathn'

class Numeric
  # Squares the number
  def square
    self * self
  end

  # Cube the number
  def cube
    self.square * self
  end

  # Finds the square root of the number
  def sqrt
    Math.sqrt(self)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
darkhelmet-darkext-0.3.0 lib/darkext/numeric.rb
darkhelmet-darkext-0.3.1 lib/darkext/numeric.rb
darkhelmet-darkext-0.3.2 lib/darkext/numeric.rb
darkhelmet-darkext-0.4.0 lib/darkext/numeric.rb
darkhelmet-darkext-0.4.1 lib/darkext/numeric.rb
darkhelmet-darkext-0.4.2 lib/darkext/numeric.rb
darkhelmet-darkext-0.4.3 lib/darkext/numeric.rb
darkhelmet-darkext-0.5.0 lib/darkext/numeric.rb