A function calculates value for Rubber banding effect
public func rubberBand(value: Double, min: Double, max: Double, bandLength: Double) -> DoubleLicensed under the Apache License 2.0. These terms also apply to the source code in the published 1.0.0 release, including copies already obtained. See NOTICE for third-party attribution.