src/context.js
function calcBezierAtT(p, t) {
    var x = (1-t)*(1-t)*(1-t)*p[0].x + 3*(1-t)*(1-t)*t*p[1].x + 3*(1-t)*t*t*p[2].x + t*t*t*p[3].x;
    var y = (1-t)*(1-t)*(1-t)*p[0].y + 3*(1-t)*(1-t)*t*p[1].y + 3*(1-t)*t*t*p[2].y + t*t*t*p[3].y;
    return new Point(x, y);
}
function calcBezierAtT(p, t) {
    var x = (1-t)*(1-t)*(1-t)*p[0].x + 3*(1-t)*(1-t)*t*p[1].x + 3*(1-t)*t*t*p[2].x + t*t*t*p[3].x;
    var y = (1-t)*(1-t)*(1-t)*p[0].y + 3*(1-t)*(1-t)*t*p[1].y + 3*(1-t)*t*t*p[2].y + t*t*t*p[3].y;
    return new Point(x, y);
}
function calcBezierAtT ( p , t ) { var x = ( 1 - t ) * ( 1 - t ) * ( 1 - t ) * p [ 0 ] . x + 3 * ( 1 - t ) * ( 1 - t ) * t * p [ 1 ] . x + 3 * ( 1 - t ) * t * t * p [ 2 ] . x + t * t * t * p [ 3 ] . x ; var y = ( 1 - t ) * ( 1 - t ) * ( 1 - t ) * p [ 0 ] . y + 3 * ( 1 - t ) * ( 1 - t ) * t * p [ 1 ] . y + 3 * ( 1 - t ) * t * t * p [ 2 ] . y + t * t * t * p [ 3 ] . y ; return new Point ( x , y ) ; }
Calculate Bezier at T

@param {number} p
@param {number} t

@returns {void}
Calculate Bezier at T