I'm having trouble understanding how this code calculates the dot product which I understand as |A||B|cos Ɵ
Multiplying the cordinates together seems too easy
* Calculates the dot product of this vector and another given vector.
* @param v2 Another Vector2D instance.
* @return Number The dot product of this vector and the one passed in as a parameter.
public function dotProd(v2:Vector2D):Number
return _x * v2.x + _y * v2.y;