一个函数计算橡皮筋效果的值
public func rubberBand(value: Double, min: Double, max: Double, bandLength: Double) -> Double