f64/d2/vec.go
func (v Vec) Dot(v2 Vec) float64 {
	return v.X*v2.X + v.Y*v2.Y
}
func (v Vec) Dot(v2 Vec) float64 {
	return v.X*v2.X + v.Y*v2.Y
}
func ( v Vec ) Dot ( v2 Vec ) float64 { return v . X * v2 . X + v . Y * v2 . Y }
// Dot returns the dot product of this vector with another.
//
// There are multiple ways to describe this value. One is the multiplication of
// their lengths and cos(theta) where theta is the angle between the vectors:
//  v.v2 = |v||v2|cos(theta).
//
// The other (and what is actually done) is the sum of the element-wise
// multiplication of all elements. So for instance, two Vec's would yield:
//  v.x * v2.x + v.y * v2.y
//
// This means that the dot product of a vector and itself is the square of its
// Len (within the bounds of floating points error).
//
// The dot product is roughly a measure of how closely two vectors are to
// pointing in the same direction. If both vectors are normalized, the value will
// be -1 for opposite pointing, one for same pointing, and 0 for perpendicular
// vectors.
Dot returns the dot product of this vector with another . There are multiple ways to describe this value . One is the multiplication of their lengths and cos ( theta ) where theta is the angle between the vectors : v . v2 = |v||v2|cos ( theta ) . The other ( and what is actually done ) is the sum of the element - wise multiplication of all elements . So for instance two Vec s would yield : v . x * v2 . x + v . y * v2 . y This means that the dot product of a vector and itself is the square of its Len ( within the bounds of floating points error ) . The dot product is roughly a measure of how closely two vectors are to pointing in the same direction . If both vectors are normalized the value will be - 1 for opposite pointing one for same pointing and 0 for perpendicular vectors .