rTriangle

alias rTriangle = Triangle!real

Examples

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

Meta