map
Applies the same scalar transformation to each component.
var doubled = vector.map(value -> value * 2F);
Content copied to clipboard
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