MCPcopy Create free account
hub / github.com/RozDavid/UnScene3D / triangleNormal

Function triangleNormal

utils/cpp_utils/include/vec3.h:462–464  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

460
461 template<class T>
462 inline vec3<T> triangleNormal(const vec3<T> &v0, const vec3<T> &v1, const vec3<T> &v2) {
463 return ((v1 - v0) ^ (v2 - v0)).getNormalized();
464 }
465
466 template<class T>
467 inline float trianglePointDistSq(const vec3<T> &t0, const vec3<T> &t1, const vec3<T> &t2, const vec3<T> &p) {

Callers

nothing calls this directly

Calls 1

getNormalizedMethod · 0.80

Tested by

no test coverage detected