map

@NotNull
open fun map(@NotNull function: @NotNull Float2FloatFunction): @NotNull Keyframe

Transforms the scalar result. Mapping a Constant applies the function immediately.


var doubled = Keyframe.of(2F).map(value -> value * 2F);

Return

the mapped keyframe, or this keyframe for the identity sentinel

Since

3.7.0

Parameters

function

the transformation to apply

Throws

if mapping a constant and the transformation throws