Unexpected behavior with math.add and math.multiply with >2 parameters
I'm seeing the following errors when I try to use math.add with more than 2 non-scalar parameters.
math.add(1, 2, 3); //OK
math.add([1,1], [2,2], [3,3]); //TypeError: Too many arguments in function add (expected: 2, actual: 3)
math.add(0, 0, [1,1], [2,2], [3,3]); //OK
math.multiply(2, 3, 4); // OK
math.multiply([3,3], [3,3], [4,4]); // TypeError: Too many arguments in function add (expected: 2, actual: 3)
math.multiply(1, 1, [2,2], [3,3], [4,4]); // OK
The problem seems that adding three Arrays triggers the "Array, Array" filter whose handler only accepts two parameters.
By adding scalar values in front, I get around the "Array, Array" filter to the "any, any, ...any" filter which allows for multiple parameters.
Thanks for reporting, this should indeed just work.
I'd like to work on this 😃
Thanks for your offer @iamnapo, that would be great!
This should be fixed in v3.16.5, thanks again @iamnapo for the help in tracing down the issue