Context
I ran into a great presentation about increasing Vector math performance that advises to add output arguments to functions to prevent the creation of unneeded objects.
Proposal
EX.Vector already has some functions (scale, add, sub, rotate and clone) that have an optional dest argument, so I'm suggesting to consistently add an optional destargument to the following functions:
min
max
normalize
cross
perpendicular
Optional
- Add an extra argument for the fallback anchor used in
rotate
- Use
destination or output instead of the abbreviated dest currently used.
- Update the documentation to inform developers of the potential performance gains from using this argument when using
Vector. (Even more optional: Add code examples to show the differences)
Context
I ran into a great presentation about increasing Vector math performance that advises to add output arguments to functions to prevent the creation of unneeded objects.
Proposal
EX.Vectoralready has some functions (scale,add,sub,rotateandclone) that have an optionaldestargument, so I'm suggesting to consistently add an optionaldestargument to the following functions:minmaxnormalizecrossperpendicularOptional
rotatedestinationoroutputinstead of the abbreviateddestcurrently used.Vector. (Even more optional: Add code examples to show the differences)