|
@@ -91,9 +91,15 @@ public:
|
|
|
/// Multiply with a scalar.
|
|
/// Multiply with a scalar.
|
|
|
IntVector3 operator *(int rhs) const { return IntVector3(x_ * rhs, y_ * rhs, z_ * rhs); }
|
|
IntVector3 operator *(int rhs) const { return IntVector3(x_ * rhs, y_ * rhs, z_ * rhs); }
|
|
|
|
|
|
|
|
|
|
+ /// Multiply with a vector.
|
|
|
|
|
+ IntVector3 operator *(const IntVector3& rhs) const { return IntVector3(x_ * rhs.x_, y_ * rhs.y_, z_ * rhs.z_); }
|
|
|
|
|
+
|
|
|
/// Divide by a scalar.
|
|
/// Divide by a scalar.
|
|
|
IntVector3 operator /(int rhs) const { return IntVector3(x_ / rhs, y_ / rhs, z_ / rhs); }
|
|
IntVector3 operator /(int rhs) const { return IntVector3(x_ / rhs, y_ / rhs, z_ / rhs); }
|
|
|
|
|
|
|
|
|
|
+ /// Divide by a vector.
|
|
|
|
|
+ IntVector3 operator /(const IntVector3& rhs) const { return IntVector3(x_ / rhs.x_, y_ / rhs.y_, z_ / rhs.z_); }
|
|
|
|
|
+
|
|
|
/// Add-assign a vector.
|
|
/// Add-assign a vector.
|
|
|
IntVector3& operator +=(const IntVector3& rhs)
|
|
IntVector3& operator +=(const IntVector3& rhs)
|
|
|
{
|
|
{
|
|
@@ -121,6 +127,15 @@ public:
|
|
|
return *this;
|
|
return *this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// Multiply-assign a vector.
|
|
|
|
|
+ IntVector3& operator *=(const IntVector3& rhs)
|
|
|
|
|
+ {
|
|
|
|
|
+ x_ *= rhs.x_;
|
|
|
|
|
+ y_ *= rhs.y_;
|
|
|
|
|
+ z_ *= rhs.z_;
|
|
|
|
|
+ return *this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// Divide-assign a scalar.
|
|
/// Divide-assign a scalar.
|
|
|
IntVector3& operator /=(int rhs)
|
|
IntVector3& operator /=(int rhs)
|
|
|
{
|
|
{
|
|
@@ -130,6 +145,15 @@ public:
|
|
|
return *this;
|
|
return *this;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ /// Divide-assign a vector.
|
|
|
|
|
+ IntVector3& operator /=(const IntVector3& rhs)
|
|
|
|
|
+ {
|
|
|
|
|
+ x_ /= rhs.x_;
|
|
|
|
|
+ y_ /= rhs.y_;
|
|
|
|
|
+ z_ /= rhs.z_;
|
|
|
|
|
+ return *this;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/// Return integer data.
|
|
/// Return integer data.
|
|
|
const int* Data() const { return &x_; }
|
|
const int* Data() const { return &x_; }
|
|
|
|
|
|