I'll just get down to it.. this is right, right?

/* Get Normals.. */ class nVectorMath { // // public: static void Subtract( Vertex3D& ret, Vertex3D v1, Vertex3D v2 ) { ret.x = v1.x - v2.x; ret.y = v1.y - v2.y; ret.z = v1.z - v2.z; } static void Add( Vertex3D& ret, Vertex3D v ) { ret.x += v.x; ret.y += v.y; ret.z += v.z; } // // static float Dot( Vertex3D v1, Vertex3D v2 ) { return v1.x * v2.x + v1.y * v2.y + v1.z * v2.z; } static void Cross( Vertex3D& ret, Vertex3D v1, Vertex3D v2 ) { ret.x = v1.y* v2.z - v1.z* v2.y; ret.y = v1.z* v2.x - v1.x* v2.z; ret.z = v1.x* v2.y - v1.y* v2.x; } // // static void Normalize( Vertex3D& v ) { float len = sqrtf(Dot(v,v)); if(len==0) return; float invL = 1.0f/len; v.x = v.x * invL; v.y = v.y * invL; v.z = v.z * invL; } static void GetNormal( Vertex3D& n, Vertex3D a, Vertex3D b, Vertex3D c ) { Vertex3D e1, e2; Subtract( e1, a, b ); Subtract( e2, a, c ); Cross( n, e1, e2 ); Normalize( n ); } };