operate
Combines two vectors by applying the same binary operation to each pair of components.
var sum = KeyframeVector.operate(vector, KeyframeVector.ZERO, (a, b) -> a + b);
Return
the combined vector
Since
3.7.0
Parameters
the first vector
the second vector
the operation applied to all three component pairs
Throws
if the operator throws during constant folding
Combines two vectors using a separate binary operation for each axis.
var combined = KeyframeVector.operate(vector, other,
(a, b) -> a + b, (a, b) -> a - b, (a, b) -> a * b);
Return
the combined vector
Since
3.7.0
Parameters
the first vector
the second vector
the operation for the X components
the operation for the Y components
the operation for the Z components
Throws
if a component operator throws during constant folding
Combines four vectors by applying the same operation to the four values on each axis.
var sum = KeyframeVector.operate(first, second, third, fourth,
(a, b, c, d) -> a + b + c + d);
Return
the combined vector
Since
3.7.0
Parameters
the first vector
the second vector
the third vector
the fourth vector
the operation applied to the four components on each axis
Throws
if the operator throws during constant folding