MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / pglNormalize

Function pglNormalize

openpgl/include/openpgl/common.h:202–206  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202inline pgl_vec3f pglNormalize(pgl_vec3f n)
203{
204 const float f = 1.f / std::sqrt(n.x * n.x + n.y * n.y + n.z * n.z);
205 return {n.x * f, n.y * f, n.z * f};
206}
207
208#if defined(PGL_USE_DIRECTION_COMPRESSION) || defined(OPENPGL_DIRECTION_COMPRESSION)
209////////////////////////////////////////////////////////////////////////////

Callers 1

dequantize_directionFunction · 0.85

Calls 1

sqrtFunction · 0.50

Tested by

no test coverage detected