Table of Contents

Enum EasingFunction

Namespace
Stride.CommunityToolkit.Mathematics
Assembly
Stride.CommunityToolkit.dll

The easing curves Easing implements, selectable by value so an animation can be configured with a name instead of a method.

public enum EasingFunction
Extension Methods

Fields

BackEaseIn = 27

Pulls back below 0 before setting off. y = x³ - x sin(xπ).

BackEaseInOut = 29

Pulls back at the start and overshoots at the end.

BackEaseOut = 28

Overshoots past 1 and settles back. y = 1 - ((1 - x)³ - (1 - x) sin((1 - x)π)).

BounceEaseIn = 30

Bounces off the start, as a ball dropped in reverse.

BounceEaseInOut = 32

Bounces off the start and lands with bounces.

BounceEaseOut = 31

Lands with diminishing bounces, as a dropped ball.

CircularEaseIn = 18

A quarter circle: barely moves, then rushes the end. y = 1 - √(1 - x²).

CircularEaseInOut = 20

Two quarter circles meeting in the middle.

CircularEaseOut = 19

A quarter circle: rushes the start, then barely moves. y = √((2 - x)x).

CubicEaseIn = 6

Starts slowly, accelerates harder than quadratic. y = x³.

CubicEaseInOut = 8

Slow, fast, slow, on a cubic each side of the middle.

CubicEaseOut = 7

Starts fast, decelerates harder than quadratic. y = (x - 1)³ + 1.

ElasticEaseIn = 24

Winds up with growing wobbles, then snaps to the end. Overshoots below 0.

ElasticEaseInOut = 26

Wobbles out of the start and into the end.

ElasticEaseOut = 25

Snaps past the end and wobbles back onto it. Overshoots above 1.

ExponentialEaseIn = 21

Almost still, then explosive. y = 2^(10(x - 1)).

ExponentialEaseInOut = 23

Still, explosive through the middle, still.

ExponentialEaseOut = 22

Explosive, then almost still. y = 1 - 2^(-10x).

Linear = 0

No easing: progress equals time. y = x.

QuadraticEaseIn = 3

Starts slowly, accelerates. y = x².

QuadraticEaseInOut = 5

Slow, fast, slow, on a parabola each side of the middle.

QuadraticEaseOut = 4

Starts fast, decelerates. y = -x² + 2x.

QuarticEaseIn = 9

Starts very slowly, accelerates. y = x⁴.

QuarticEaseInOut = 11

Slow, fast, slow, on a quartic each side of the middle.

QuarticEaseOut = 10

Starts fast, decelerates to a long tail. y = 1 - (x - 1)⁴.

QuinticEaseIn = 12

The slowest start of the polynomial family. y = x⁵.

QuinticEaseInOut = 14

Slow, fast, slow, on a quintic each side of the middle.

QuinticEaseOut = 13

The longest tail of the polynomial family. y = (x - 1)⁵ + 1.

SineEaseIn = 15

A quarter of a sine wave: the softest ease-in. y = sin((x - 1)π/2) + 1.

SineEaseInOut = 17

Half a sine wave: soft at both ends. y = (1 - cos(xπ)) / 2.

SineEaseOut = 16

A quarter of a sine wave: the softest ease-out. y = sin(xπ/2).

SmoothStep = 1

Hermite blend, gentle at both ends. y = x²(3 - 2x).

SmootherStep = 2

Ken Perlin's smoother blend, flat at both ends. y = x³(x(6x - 15) + 10).

Remarks

Every curve maps a normalised time in [0, 1] to a progress in [0, 1], starting at 0 and ending at 1. EaseIn starts slowly and accelerates, EaseOut starts fast and decelerates, EaseInOut does both. The Elastic and Back families overshoot the ends on the way, which is what gives a bounce or a wobble; every other curve stays inside [0, 1]. Evaluate one with Ease<T>(T, EasingFunction) or the extension Ease<T>(EasingFunction, T).