InterpolationNode.Interpolation


public final class InterpolationNode.Interpolation


Interpolation functions for use in an InterpolationNode.

Summary

Public fields

static final @NonNull InterpolationNode.Interpolation

Inverse linear interpolation.

static final @NonNull InterpolationNode.Interpolation

Linear interpolation.

Public methods

final @NonNull Version

Returns the minimum required Version for this Interpolation.

@NonNull String

Public fields

INVERSE_LERP

public static final @NonNull InterpolationNode.Interpolation INVERSE_LERP

Inverse linear interpolation. Evaluates to 0 when the InterpolationNode.paramInput value is equal to the InterpolationNode.startInput value, and to 1 when the parameter is equal to the InterpolationNode.endInput value. Evaluates to null when the InterpolationNode.startInput and InterpolationNode.endInput values are equal.

LERP

public static final @NonNull InterpolationNode.Interpolation LERP

Linear interpolation. Evaluates to the InterpolationNode.startInput value when the InterpolationNode.paramInput value is 0, and to the InterpolationNode.endInput value when the InterpolationNode.paramInput value is 1.

Public methods

calculateMinimumRequiredVersion

Added in 1.1.0-alpha06
public final @NonNull Version calculateMinimumRequiredVersion()

Returns the minimum required Version for this Interpolation.

By default, decoding a androidx.ink.brush.BrushFamily containing an Interpolation with a minimum required version higher than Version.MAX_SUPPORTED will fail.

toString

public @NonNull String toString()