module Perlin::Curve

Constants

CUBIC
LINEAR
QUINTIC

Public Class Methods

contrast(curve, times) click to toggle source

Returns a Proc object which applies S-curve function to a given number between 0 and 1. @param curve @param times @return

# File lib/perlin/curve.rb, line 14
def self.contrast(curve, times)
  lambda { |n|
    times.times do
      n = curve.call n
    end
    n
  }
end