if( sample_count < 2 )
return 0;
- v3f
- average_direction,
+ v3f average_direction,
average_normal;
v2f min_co, max_co;
v3_copy( si->normal3, n0 );
v3_copy( sj->normal3, n1 );
v3_cross( n0, n1, dir );
+
+ if( v3_length2( dir ) <= 0.001f )
+ continue;
+
v3_normalize( dir );
/* make sure the directions all face a common hemisphere */