Sha256: 2deb5d80ba3219d7b963ebd9d167cc23fd587ab526baae27d79ecaa1f2e6f2ae
Contents?: true
Size: 389 Bytes
Versions: 2
Compression:
Stored size: 389 Bytes
Contents
module Variation class SigmoidChange < Change # Pass :length and :end_value by hash. Length must be > 0. def initialize hashed_args super(hashed_args) @abruptness = hashed_args[:abruptness] || 0.5 end def transition_function start_point end_point = [start_point[0] + length, end_value] SigmoidFunction.from_points start_point, end_point, @abruptness end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
variation-0.2.1 | lib/variation/changes/sigmoid_change.rb |
variation-0.2.0 | lib/variation/changes/sigmoid_change.rb |