rTriangle
alias rTriangle = Triangle!real
1 auto poly = fTriangle( vec3(0,0,0), vec3(1,0,0), vec3(0,1,0) );
2 assert( poly.area == 0.5f );
3 assert( poly.norm == vec3(0,0,1) );
4
5 auto pnt = vec3( 2,2,2 );
6 auto a = poly.altitude( pnt );
7 assert( a.pos == vec3(2,2,0) );
8 assert( a.dir == vec3(0,0,2) );