MCPcopy Create free account
hub / github.com/WheretIB/nullc / normalize3

Function normalize3

NULLC/includes/math.cpp:160–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158 return sqrt(v->x * v->x + v->y * v->y + v->z * v->z);
159 }
160 float normalize3(float4* v)
161 {
162 float len = length3(v), invLen = 1.0f / len;
163 v->x *= invLen;
164 v->y *= invLen;
165 v->z *= invLen;
166 return len;
167 }
168
169 float dot2(float2 *a, float2 *b)
170 {

Callers

nothing calls this directly

Calls 1

length3Function · 0.85

Tested by

no test coverage detected