map

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

Applies the same scalar transformation to each component.


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

Return

the mapped vector, or this vector for the identity sentinel

Since

3.7.0

Parameters

function

the transformation for each component

Throws

if the transformation throws while mapping a constant component