dot

infix inline fun dot(other: Vector2F): Float

Returns the dot product of this and the other vector.

Selected identities that the dot satisfies:

  1. a dot b = b dot a

  2. a dot b = a.magnitude * b.magnitude * cos(theta)

  3. (a dot b)^2 + (a perpDot b)^2 = a.magnitude^2 * b.magnitude^2

where theta is the angle from vector a to vector b.