MCPcopy Create free account
hub / github.com/DFHack/dfhack / normalize

Function normalize

plugins/siege-engine.cpp:234–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

232}
233
234inline void normalize(float &x, float &y, float &z)
235{
236 float dist = sqrtf(x*x + y*y + z*z);
237 if (dist == 0.0f) return;
238 x /= dist; y /= dist; z /= dist;
239}
240
241static Random::MersenneRNG rng;
242

Callers 1

doLaunchContentsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected