Top Level Namespace

Defined Under Namespace

Modules: Topiary

Instance Method Summary collapse

Instance Method Details

#factorial(n) ⇒ Object

Ruby has no factorial function, but fact(n) == Math.gamma(n + 1)



3
4
5
# File 'lib/topiary/directed_graph.rb', line 3

def factorial(n)
  Math.gamma(n + 1)
end