operate
@NotNull
Combines two scalar keyframes. If all operands are Constant values, applies the operator immediately.
var sum = Keyframe.operate(Keyframe.of(1F), Keyframe.of(2F),
(a, b) -> a + b);
Content copied to clipboard
Return
the combined keyframe
Since
3.7.0
Parameters
p0
the first operand
p1
the second operand
operator
the operation to apply to the operand values
Throws
if all operands are constants and the operator throws
@NotNull
Combines four scalar keyframes. If all operands are Constant values, applies the operator immediately.
var sum = Keyframe.operate(Keyframe.of(1F), Keyframe.of(2F), Keyframe.of(3F), Keyframe.of(4F),
(a, b, c, d) -> a + b + c + d);
Content copied to clipboard
Return
the combined keyframe
Since
3.7.0
Parameters
p0
the first operand
p1
the second operand
p2
the third operand
p3
the fourth operand
operator
the operation to apply to the operand values
Throws
if all operands are constants and the operator throws