Element-wise Vector Multiplication in Unity (Vector3.Scale)
I often need to multiply two vectors together one element at a time. This is
called the Hadamard Product
[https://en.wikipedia.org/wiki/Hadamard_product_(matrices)].
Typically I do it this way:
Vector3 a=new Vector3(1,2,3);
Vector3 b=new Vector3(4,5,6);
Vector3 result = new