Vector2.dotProduct()

Return the dot product between this vector and the vector given as parameter

Parameters

NameTypeDescription
1vVector2

Return value

number

the dot product

Usage

import {Vector2} from '@lcluber/type6js';

let vector1 = new Vector2(1,3);
let vector2 = new Vector2(2,5);
let dotProduct = vector1.dotProduct(vector2);