You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Other math functions when given a vector should return a vector of the element-wise results
Given any math function "f" when the input is a vector:
function f(v) = [
for(i = v) f(i)
];
floor([1.9, [2.1, -0.5]]) should return [1, [2, -1]]
This would apply to math function that currently take a single scaler argument and return a scaler.
ie: abs, sign, sin, cos, tan, acos, asin, atan, floor, round, ceil, ln, log, sqrt, exp.
I think it could be useful to accept vectors for builtin math functions (GLSL for example acts similarly for many of its math functions), but I'm not sure about the recursive aspect.
I especially don't feel that min/max should be recursive, since it is dependent on comparison operator, which is already recursive over vectors, ordered lexicographically. With that in mind, if min/max were to accept multiple vectors, i would expect the result to be a single one of those vectors, rather than element-wise comparison.
eg: max([1,3,5],[3,2,1]) == [3,2,1]
min() and max() should work with vectors
ie:
Output:
Of course it would be recursive.
Output:
ECHO: [[7, 5], [6, 8]]
Other math functions when given a vector should return a vector of the element-wise results
Given any math function "f" when the input is a vector:
floor([1.9, [2.1, -0.5]])
should return[1, [2, -1]]
This would apply to math function that currently take a single scaler argument and return a scaler.
ie: abs, sign, sin, cos, tan, acos, asin, atan, floor, round, ceil, ln, log, sqrt, exp.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: