Skip to content

format

typescript
Vector2.Dot(lhs, rhs)

class: Vector2

description

Calculates the dot product of two vectors.

parameter

param_nametypedescription
lhsVector2The vector lhs.
rhsVector2The vector rhs.

return

typedescription
number

code example

typescript
let lhs = new Vector2(1, 2);
let rhs = new Vector2(1, 2);
Debug.Log(Vector2.Dot(lhs, rhs)); // 5