Improve abs() function
Closed this issue · 3 comments
KemGus commented
Why have a separate function (positive) instead of improving abs?
The issue:
you can't return positive vector, without doing either
- Vector=positive(vector rv1)
- Vector = (abs(vector:x(), abs(vector:y(), abs(vector:z())
I want it to be
Vector = abs(vector)
thegrb93 commented
The absolute value of a vector mathematically is it's length, so I guess they didn't want to trip up people who would expect abs(vec) to return the length.
Vurv78 commented
This would be adding an overload abs(vector v)
, not improving the existing abs(number n)
.
Doing this would warrant deprecating positive
and the potential name confusion from Sparky's message above. Gates also have "positive" instead of "abs(v)" so I think it's fine keeping it as is.
Vurv78 commented
Also this would be a suggestion, so..