dotProductXYXY MethodStatic

2D dot product of vectors with the vectors presented as numbers.

  • Sign of dot product is positive <=> vectorA points into the same half-space as vectorB.
  • Sign of dot product is negative <=> vectorA points into opposite half-space as vectorB.
  • Dot product is 0 <=> perpendicular vectors.
  • Note: half-space is defined in terms of a vector, by the perpendicular plane at its origin (it splits the universe into two halves).

dotProductXYXY(ux: number, uy: number, vx: number, vy: number): number

Parameter Type Description
ux number  
uy number  
vx number  
vy number  

Returns - number

Defined in

Last Updated: 14 November, 2024