class Object
Public Instance Methods
bernstein_basis(i, n, t)
click to toggle source
# File lib/core/util.rb, line 13 def bernstein_basis(i, n, t) # http://mathworld.wolfram.com/BernsteinPolynomial.html return n.choose(i) * t ** i * (1 - t) ** (n - i) end