nl_tokens: Solves a tridiagonal system for one of coordinates ( x or y ) of first Bezier control points .
pl_tokens: function ( rhs ) { var n = rhs . <mask> ; // `x` is a solution vector. var x = [ ] ; var tmp = [ ] ; var b = 2.0 ; x [ 0 ] = rhs [ 0 ] / b ; // Decomposition and forward substitution. for ( var i = 1 ; i < n ; i ++ ) { tmp [ i ] = 1 / b ; b = ( i < n - 1 ? 4.0 : 3.5 ) - tmp [ i ] ; x [ i ] = ( rhs [ i ] - x [ i - 1 ] ) / b ; } for ( i = 1 ; i < n ; i ++ ) { // Backsubstitution. x [ n - i - 1 ] -= tmp [ n - i ] * x [ n - i ] ; } return x ; }