Class: Numeric

Inherits:
Object show all
Defined in:
lib/y_support/unicode.rb

Overview

Defined aliases

  • – root of arbitrary degree ( x.√( n ) is n ** ( 1 / x ) ).

  • sqrt as in 4.sqrt for square root (Math#sqrt).

Instance Method Summary collapse

Instance Method Details

#sqrtObject

Square root (using Math#sqrt).



68
69
70
# File 'lib/y_support/unicode.rb', line 68

def sqrt
  Math.sqrt( self )
end

#(number) ⇒ Object



61
62
63
# File 'lib/y_support/unicode.rb', line 61

def  number
  number ** ( 1.0 / self )
end