MCPcopy Create free account
hub / github.com/RenderKit/embree / cross

Function cross

common/math/vec3.h:209–209  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207 template<typename T> __forceinline Vec3<T> normalize( const Vec3<T>& a ) { return a*rsqrt(sqr(a)); }
208 template<typename T> __forceinline T distance ( const Vec3<T>& a, const Vec3<T>& b ) { return length(a-b); }
209 template<typename T> __forceinline Vec3<T> cross ( const Vec3<T>& a, const Vec3<T>& b ) { return Vec3<T>(msub(a.y,b.z,a.z*b.y), msub(a.z,b.x,a.x*b.z), msub(a.x,b.y,a.y*b.x)); }
210 template<typename T> __forceinline Vec3<T> stable_triangle_normal( const Vec3<T>& a, const Vec3<T>& b, const Vec3<T>& c )
211 {
212 const T ab_x = a.z*b.y, ab_y = a.x*b.z, ab_z = a.y*b.x;

Callers 1

Calls 1

msubFunction · 0.70

Tested by

no test coverage detected