@@ -204,7 +204,7 @@ public TickerFuture animateTo(float target, TimeSpan? duration = null, Curve cur
204
204
this . _direction = _AnimationDirection . forward ;
205
205
return this . _animateToInternal ( target , duration : duration , curve : curve ) ;
206
206
}
207
-
207
+
208
208
public TickerFuture animateBack ( float target , TimeSpan ? duration , Curve curve = null ) {
209
209
D . assert (
210
210
this . _ticker != null ,
@@ -262,7 +262,8 @@ TickerFuture _animateToInternal(float target, TimeSpan? duration = null, Curve c
262
262
new _InterpolationSimulation ( this . _value , target , simulationDuration . Value , curve ) ) ;
263
263
}
264
264
265
- public TickerFuture repeat ( float ? min = null , float ? max = null , bool reverse = false , TimeSpan ? period = null ) {
265
+ public TickerFuture repeat ( float ? min = null , float ? max = null , bool reverse = false ,
266
+ TimeSpan ? period = null ) {
266
267
min = min ?? this . lowerBound ;
267
268
max = max ?? this . upperBound ;
268
269
period = period ?? this . duration ;
@@ -278,7 +279,7 @@ public TickerFuture repeat(float? min = null, float? max = null, bool reverse =
278
279
279
280
return true ;
280
281
} ) ;
281
-
282
+
282
283
D . assert ( max >= min ) ;
283
284
D . assert ( max <= this . upperBound && min >= this . lowerBound ) ;
284
285
return this . animateWith ( new _RepeatingSimulation ( this . _value , min . Value , max . Value , reverse , period . Value ) ) ;
@@ -438,7 +439,8 @@ internal _RepeatingSimulation(float initialValue, float min, float max, bool rev
438
439
this . _min = min ;
439
440
this . _max = max ;
440
441
this . _periodInSeconds = ( float ) period . Ticks / TimeSpan . TicksPerSecond ;
441
- this . _initialT = ( max == min ) ? 0.0f : ( initialValue / ( max - min ) ) * ( period . Ticks / TimeSpan . TicksPerSecond ) ;
442
+ this . _initialT =
443
+ ( max == min ) ? 0.0f : ( initialValue / ( max - min ) ) * ( period . Ticks / TimeSpan . TicksPerSecond ) ;
442
444
this . _reverse = reverse ;
443
445
D . assert ( this . _periodInSeconds > 0.0f ) ;
444
446
D . assert ( this . _initialT >= 0.0f ) ;
@@ -454,11 +456,12 @@ public override float x(float timeInSeconds) {
454
456
D . assert ( timeInSeconds >= 0.0f ) ;
455
457
float totalTimeInSeconds = timeInSeconds + this . _initialT ;
456
458
float t = ( totalTimeInSeconds / this . _periodInSeconds ) % 1.0f ;
457
- bool _isPlayingReverse = ( ( int ) ( totalTimeInSeconds / this . _periodInSeconds ) ) % 2 == 1 ;
459
+ bool _isPlayingReverse = ( ( int ) ( totalTimeInSeconds / this . _periodInSeconds ) ) % 2 == 1 ;
458
460
459
461
if ( this . _reverse && _isPlayingReverse ) {
460
462
return MathUtils . lerpFloat ( this . _max , this . _min , t ) ;
461
- } else {
463
+ }
464
+ else {
462
465
return MathUtils . lerpFloat ( this . _min , this . _max , t ) ;
463
466
}
464
467
}
0 commit comments