Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/project/math.rb

Overview

Golden Sections mathematical methods

Instance Method Summary collapse

Instance Method Details

#golden_section(exponent = 1) ⇒ Object

Returns the golden section of a number

Parameters:

  • exponent (Numeric) (defaults to: 1)

    the exponent of the golden mean, defaults to 1



7
8
9
# File 'lib/project/math.rb', line 7

def golden_section(exponent=1)
self/(Golden_Sections::Golden_Mean**exponent)
end