# Class EasingFunctions

Standard easing functions for motion in Excalibur, defined on a domain of [0, duration] and a range from [+startValue,+endValue] Given a time, the function will return a value from positive startValue to positive endValue.

``````function Linear (t) {   return t * t;}// accelerating from zero velocityfunction EaseInQuad (t) {   return t * t;}// decelerating to zero velocityfunction EaseOutQuad (t) {   return t * (2 - t);}// acceleration until halfway, then decelerationfunction EaseInOutQuad (t) {   return t < .5 ? 2 * t * t : -1 + (4 - 2 * t) * t;}// accelerating from zero velocityfunction EaseInCubic (t) {   return t * t * t;}// decelerating to zero velocityfunction EaseOutCubic (t) {   return (--t) * t * t + 1;}// acceleration until halfway, then decelerationfunction EaseInOutCubic (t) {   return t < .5 ? 4 * t * t * t : (t - 1) * (2 * t - 2) * (2 * t - 2) + 1;}
``````

#### Hierarchy

• EasingFunctions

## Properties

EaseInCubic: Util.EasingFunction = ...
EaseInOutCubic: Util.EasingFunction = ...
EaseInQuad: ((time: number, start: number, end: number, duration: number) => number) = ...

#### Type declaration

• (time: number, start: number, end: number, duration: number): number

#### Returns number

EaseOutCubic: Util.EasingFunction = ...
Linear: Util.EasingFunction = ...

## Methods

#### Returns ((time: number, start: number, end: number, duration: number) => number)

• (time: number, start: number, end: number, duration: number): number

#### Returns ((time: number, start: Vector, end: Vector, duration: number) => Vector)

• (time: number, start: Vector, end: Vector, duration: number): Vector