mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-09-05 01:26:17 -04:00
various Z2Audio / JAudio debug cleanup (#2876)
* some JAudio work * audio cleanup checkpoint * checkpoint more audio cleanup * fix symbols * more z2 cleanup * fix regression * fix build * some fixes
This commit is contained in:
@@ -41,6 +41,16 @@ struct TUtil<f32> {
|
||||
root = 0.5f * root * (3.0f - x * (root * root));
|
||||
return root;
|
||||
}
|
||||
|
||||
static inline f32 sqrt(f32 x) {
|
||||
if (x <= 0.0f) {
|
||||
return x;
|
||||
}
|
||||
|
||||
f32 root = __frsqrte(x);
|
||||
root = 0.5f * root * (3.0f - x * (root * root));
|
||||
return x * root;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
@@ -216,7 +226,7 @@ struct TVec3<f32> : public Vec {
|
||||
}
|
||||
|
||||
inline TVec3<f32>& operator=(const TVec3<f32>& b) {
|
||||
set(b.x, b.y, b.z);
|
||||
setTVec3f(&b.x, &this->x);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@@ -439,12 +449,7 @@ struct TVec2 {
|
||||
}
|
||||
|
||||
f32 length() const {
|
||||
f32 sqr = squared();
|
||||
if (sqr <= 0.0f) {
|
||||
return sqr;
|
||||
}
|
||||
sqr *= fsqrt_step(sqr);
|
||||
return sqr;
|
||||
return TUtil<f32>::sqrt(squared());
|
||||
}
|
||||
|
||||
T x;
|
||||
|
||||
Reference in New Issue
Block a user