The arc easing is its easing curve for a circle of arcs, how we assume the slope of the point on the arc as the speed, then you can imagine the change in the speed of how dramatic, its acceleration or deceleration came very suddenly, and 5 times the ease of the same.
Refer to the following code:
//圆形缓动
protected override double GetCurrentValueCore(double defaultOriginValue, double defaultDestinationValue, AnimationClock animationClock)
{
double from = (this.From==null?defaultDestinationValue:(double)this.From);
double to = (this.To==null?defaultOriginValue:(double)this.To);
double delta = to - from;
double value = animationClock.CurrentProgress.Value;
double t = value * this.Duration.TimeSpan.Ticks;
double d = this.Duration.TimeSpan.Ticks;
//加速
//return delta * (1-Math.Sqrt(1-(t/=d)*t)) + from;
//减速
//return delta * Math.Sqrt(1 - (t = t / d - 1) * t) + from;
//先加速,后减速
if ((t /= (d / 2)) < 1)
{
return delta / 2 * (1 - Math.Sqrt(1 - t * t)) + from;
}
return delta / 2 * (Math.Sqrt(1 - (t -= 2) * t) + 1) + from;
}
This article supporting source code