nl_tokens: Finds the next octant that intersects with the ray based on the exit plane of the current one .
pl_tokens: function findNextOctant ( currentOctant , tx1 , ty1 , tz1 ) { let min ; let exit = 0 ; // Find the exit plane. if ( tx1 < ty1 ) { <mask> = tx1 ; exit = 0 ; // YZ-plane. } else { min = ty1 ; exit = 1 ; // XZ-plane. } if ( tz1 < min ) { exit = 2 ; // XY-plane. } return octantTable [ currentOctant ] [ exit ] ; }