#NEWLINE# def plane_normalize( plane ) : #NEWLINE# #INDENT# ( a , b , c , d ) = plane #NEWLINE# lsq = ( ( ( a * a ) + ( b * b ) ) + ( c * c ) ) #NEWLINE# if ( lsq > 0.0 ) : #NEWLINE# #INDENT# lr = ( 1.0 / math . sqrt ( lsq ) ) #NEWLINE# return ( ( a * lr ) , ( b * lr ) , ( lsq * lr ) , ( d * lr ) ) #NEWLINE# #UNINDENT# return V4ZERO