More miscellaneous TU improvements (#2665)

This commit is contained in:
Max Roncace
2025-09-17 08:01:59 -04:00
committed by GitHub
parent 2106c56f60
commit fe5e8aff98
33 changed files with 659 additions and 596 deletions
+15 -6
View File
@@ -64,13 +64,22 @@ struct cXyz : Vec {
z *= other.z;
}
void operator-=(const Vec& other) { VECSubtract(this, &other, this); }
cXyz* operator+=(const Vec& other) {
VECAdd(this, &other, this);
cXyz* operator-=(const Vec& other) {
PSVECSubtract(this, &other, this);
return this;
}
cXyz* operator+=(const Vec& other) {
PSVECAdd(this, &other, this);
return this;
}
cXyz* operator*=(f32 scale) {
PSVECScale(this, this, scale);
return this;
}
cXyz* operator/=(f32 scale) {
PSVECScale(this, this, 1.0f / scale);
return this;
}
void operator*=(f32 scale) { VECScale(this, this, scale); }
void operator/=(f32 scale) { VECScale(this, this, 1.0f / scale); }
/* 80266C6C */ cXyz getCrossProduct(Vec const&) const;
/* 80266CBC */ cXyz outprod(Vec const&) const;
/* 80266CE4 */ cXyz norm() const;
@@ -105,7 +114,7 @@ struct cXyz : Vec {
void zero() { set(0.0f, 0.0f, 0.0f); }
f32 getSquareMag() const { return VECSquareMag(this); }
f32 getSquareMag() const { return PSVECSquareMag(this); }
f32 getSquareDistance(const Vec& other) const { return PSVECSquareDistance(this, &other); }
static f32 getNearZeroValue() { return 8e-11f; }