Closed Smilebags closed 7 years ago
I would know how to implement that, but would happen to the old functions? Would they just become deprecated? Would we have both nAdd() function and vector.nAdd() function?
It should be able to work as the one function. Check out how p5.Vector works, it seems to just look at the arguments then decides how to run the function.
I believe v1.nAdd(v2) should actually just call nAdd(this,v2) inside the function, but I might have forgotten to return the result in my playing around.
I just reviewed the p5.Vector code and maybe their functions aren't working in the same way as what I am thinking. If you think you know how to implement it, give it a try, it would be great to see.
I made a PR for this!
I wasn't sure how to do this, nice work!
We have completed all the initial functions from p5.Vector. Great work! Next I think we should work on adding v1.nAdd(v2) functionality, which should behave the same as nAdd(v1,v2) I have tried adding that functionality to a few functions but I don't believe it is working.