MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / unitVector

Function unitVector

unity/src/native/steamaudio_unity_native.cpp:244–251  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

242}
243
244IPLVector3 unitVector(IPLVector3 v)
245{
246 auto length = sqrtf(v.x * v.x + v.y * v.y + v.z * v.z);
247 if (length < 1e-2f)
248 length = 1e-2f;
249
250 return IPLVector3{ v.x / length, v.y / length, v.z / length };
251}
252
253float dot(const IPLVector3& a,
254 const IPLVector3& b)

Callers 3

calcSourceCoordinatesFunction · 0.70
calcListenerCoordinatesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected