summaryrefslogtreecommitdiff
path: root/include/SSystem/SComponent
diff options
context:
space:
mode:
Diffstat (limited to 'include/SSystem/SComponent')
-rw-r--r--include/SSystem/SComponent/c_xyz.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/include/SSystem/SComponent/c_xyz.h b/include/SSystem/SComponent/c_xyz.h
index 2084f8eeeb..b5e2410d71 100644
--- a/include/SSystem/SComponent/c_xyz.h
+++ b/include/SSystem/SComponent/c_xyz.h
@@ -64,13 +64,22 @@ struct cXyz : Vec {
z *= other.z;
}
- void operator-=(const Vec& other) { VECSubtract(this, &other, this); }
+ cXyz* operator-=(const Vec& other) {
+ PSVECSubtract(this, &other, this);
+ return this;
+ }
cXyz* operator+=(const Vec& other) {
- VECAdd(this, &other, this);
+ 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; }