MCPcopy
hub / github.com/stemkoski/stemkoski.github.com / interpolate

Function interpolate

Three.js/js/Three66.js:6575–6582  ·  view source on GitHub ↗
( p0, p1, p2, p3, t, t2, t3 )

Source from the content-addressed store, hash-verified

6573 // Catmull-Rom
6574
6575 function interpolate( p0, p1, p2, p3, t, t2, t3 ) {
6576
6577 var v0 = ( p2 - p0 ) * 0.5,
6578 v1 = ( p3 - p1 ) * 0.5;
6579
6580 return ( 2 * ( p1 - p2 ) + v0 + v1 ) * t3 + ( - 3 * ( p1 - p2 ) - 2 * v0 - v1 ) * t2 + v0 * t + p1;
6581
6582 };
6583
6584};
6585

Callers 2

Three66.jsFile · 0.70
interpolateCatmullRomFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected