nl_tokens: / * js / src / dn / * js / src / dn / rayshoot . js Computes the hyperplane in Ax = b closest to z with respect to the direction r . Complexity is O ( nd ) .
pl_tokens: function rayshoot ( d , m , A , b , z , r ) { var i = 0 ; var j = m ; var w = undefined ; while ( true ) { if ( i >= j ) return j ; var h = A [ i ] ; w = ( b [ i ] - vdot ( d , h , z ) ) / vdot ( d , h , r ) ; if ( w >= 0 ) break ; ++ i ; } var k = i ; while ( true ) { ++ i ; if ( i >= j ) return k ; var h = A [ i ] ; var l = ( b [ i ] - vdot ( d , h , z ) ) / vdot ( d , h , r ) ; if ( l < 0 || l >= w ) <mask> ; k = i ; w = l ; } }