Smilebags / p5.dimensions.js

An addon for p5.js which adds support for higher dimensional calculations.
72 stars 24 forks source link

Added multiply and divide vector function #7

Closed max0410 closed 7 years ago

max0410 commented 7 years ago

The functions multiply and divide the vector's values by a number. Should we add a function for multiplying and dividing two vectors together? It could be the same function, and it checks the input of the function to see what it will do. Example: (vector, number): The function will times the vector by the number (vector, vector): The function will times the vector by the vector

Smilebags commented 7 years ago

Yes, I think one function to do them both would be useful. I don't believe that is implemented in p5.Vector, but would be good not to have to worry about which function to use.