MCPcopy Create free account
hub / github.com/andrewwillmott/splines-lib / InvSqrtFast

Function InvSqrtFast

Splines.cpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29 }
30
31 inline float InvSqrtFast(float x)
32 {
33 float xhalf = 0.5f * x;
34 int32_t i = (int32_t&) x;
35
36 i = 0x5f375a86 - (i >> 1);
37 x = (float&) i;
38 x = x * (1.5f - xhalf * x * x);
39
40 return x;
41 }
42
43 inline bool Larger(const Bounds2& bb, float t) { Vec2f d = bb.mMax - bb.mMin; return d.x > t || d.y > t; }
44 inline bool Larger(const Bounds3& bb, float t) { Vec3f d = bb.mMax - bb.mMin; return d.x > t || d.y > t || d.z > t; }

Callers 3

AdvanceAgentMethod · 0.85
OffsetMethod · 0.85
OffsetLRFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected