Vector2.quadraticBezier()

Set the interpolation point between the three vectors given as first, second and third parameters using the normalized amount given as fourth parameter

Parameters

NameTypeDescription
1p0Vector2
2p1Vector2
3p2Vector2
4tnumber

Return value

Vector2

The vector with its new values

Usage

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

let array = [2,2];

let p0 = Vector2(2,4); 
let p1 = Vector2(4,6); 
let p2 = Vector2(8,8);
let t  = 4;
let vector = new Vector2(1,1);
console.log(vector); //(1,1)
vector.quadraticBezier(p0, p1, p2, t);
console.log(vector);