| 86 | } |
| 87 | |
| 88 | F32 xsqrt(F32 x) |
| 89 | { |
| 90 | const F32 half = 0.5f; |
| 91 | const F32 three = 3.0f; |
| 92 | |
| 93 | if (x <= 0.0f || isinf(x)) |
| 94 | { |
| 95 | return x; |
| 96 | } |
| 97 | |
| 98 | // non-matching: frsp instruction |
| 99 | |
| 100 | F32 guess = __frsqrte(x); |
| 101 | guess = half * guess * (three - guess * guess * x); |
| 102 | |
| 103 | if (guess > 0.0000099999997f) |
| 104 | { |
| 105 | return 1.0f / guess; |
| 106 | } |
| 107 | |
| 108 | return 100000.0f; |
| 109 | } |
| 110 | |
| 111 | U32 xBoundSphereHitsOBB(const xSphere* s, const xBox* b, const xMat4x3* m, xCollis* coll) |
| 112 | { |
no outgoing calls
no test coverage detected