@@ -25,62 +25,58 @@ public enum InterpolationMethod {
2525 Interpolates at a constant rate
2626
2727 - parameter factor: The progress of interpolation. 0 being the source and 1 being destination.
28- - parameter options: Options for processing the interpolation.
2928 */
30- case linear( _ factor: Float , options : InterpolationOptions = [ . shortest ] )
29+ case linear( _ factor: Float )
3130
3231 /**
3332 Interpolates with acceleration increasing near the destinartion
3433
3534 - parameter factor: The progress of interpolation. 0 being the source and 1 being destination.
36- - parameter options: Options for processing the interpolation.
3735 */
38- case easeIn( _ factor: Float , options : InterpolationOptions = [ . shortest ] )
36+ case easeIn( _ factor: Float )
3937
4038 /**
4139 Interpolates with acceleration increasing near the beginning
4240
4341 - parameter factor: The progress of interpolation. 0 being the source and 1 being destination.
44- - parameter options: Options for processing the interpolation.
4542 */
46- case easeOut( _ factor: Float , options : InterpolationOptions = [ . shortest ] )
43+ case easeOut( _ factor: Float )
4744
4845 /**
4946 Interpolates with acceleration increasing near the beginning, and then again at the end
5047
5148 - parameter factor: The progress of interpolation. 0 being the source and 1 being destination.
52- - parameter options: Options for processing the interpolation.
5349 */
54- case easeInOut( _ factor: Float , options : InterpolationOptions = [ . shortest ] )
50+ case easeInOut( _ factor: Float )
5551}
5652
5753public extension Float {
5854 /// Interpolates toward `to` by using `method `
5955 @inlinable
60- func interpolated( to: Float , _ method: InterpolationMethod ) -> Float {
56+ func interpolated( to: Float , _ method: InterpolationMethod , options : InterpolationOptions = . shortest ) -> Float {
6157 switch method {
62- case let . linear( factor , _ ) :
58+ case . linear( let factor ) :
6359 return self . lerped ( to: to, factor: factor)
64- case let . easeIn( factor , _ ) :
60+ case . easeIn( let factor ) :
6561 return self . easedIn ( to: to, factor: factor)
66- case let . easeOut( factor , _ ) :
62+ case . easeOut( let factor ) :
6763 return self . easedOut ( to: to, factor: factor)
68- case let . easeInOut( factor , _ ) :
64+ case . easeInOut( let factor ) :
6965 return self . easedInOut ( to: to, factor: factor)
7066 }
7167 }
7268
7369 /// Interpolates toward `to` by using `method `
7470 @inlinable
75- mutating func interpolate( to: Float , _ method: InterpolationMethod ) {
71+ mutating func interpolate( to: Float , _ method: InterpolationMethod , options : InterpolationOptions = . shortest ) {
7672 switch method {
77- case let . linear( factor , _ ) :
73+ case . linear( let factor ) :
7874 return self . lerp ( to: to, factor: factor)
79- case let . easeIn( factor , _ ) :
75+ case . easeIn( let factor ) :
8076 return self . easeIn ( to: to, factor: factor)
81- case let . easeOut( factor , _ ) :
77+ case . easeOut( let factor ) :
8278 return self . easeOut ( to: to, factor: factor)
83- case let . easeInOut( factor , _ ) :
79+ case . easeInOut( let factor ) :
8480 return self . easeInOut ( to: to, factor: factor)
8581 }
8682 }
0 commit comments