mirror of
https://github.com/zeldaret/tp
synced 2026-07-07 14:13:27 -04:00
More miscellaneous TU improvements (#2665)
This commit is contained in:
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user