EasingFunction.Linear



Parameters for a custom piecewise-linear easing function.

A piecewise-linear function is defined by a sequence of points; the value of the function at an x-position equal to one of those points is equal to the y-position of that point, and the value of the function at an x-position between two points is equal to the linear interpolation between those points' y-positions. This easing function implicitly includes the points (0, 0) and (1, 1), so the points field below need only include any points between those. If points is empty, then this function is equivalent to the Predefined.LINEAR identity function.

To be valid, all y-positions must be finite, and all x-positions must be in the range 0, 1 and must be monotonically non-decreasing. It is valid for multiple points to have the same x-position, in order to create a discontinuity in the function; in that case, the value of the function at exactly that x-position is equal to the y-position of the last of these points.

If the input x-value is outside the interval 0, 1, the output will be extrapolated from the first/last line segment.

Summary

Public constructors

Creates a new Linear easing function.

Cmn

Public functions

open operator Boolean
equals(other: Any?)
Cmn
open Int
Cmn
open String
Cmn

Public properties

List<ImmutableVec>

An immutable list of the points that define the piecewise-linear function.

Cmn

Public constructors

Linear

Linear(points: List<ImmutableVec>)

Creates a new Linear easing function.

Parameters
points: List<ImmutableVec>

The points that define the piecewise-linear function.

Public functions

equals

open operator fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

toString

open fun toString(): String

Public properties

points

val pointsList<ImmutableVec>

An immutable list of the points that define the piecewise-linear function.