Add basic placeholder Vector class.

Signed-off-by: aixxe <me@aixxe.net>
This commit is contained in:
aixxe 2016-12-19 21:12:49 +00:00
parent 1b43cae68e
commit 072ec00930
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
#pragma once
struct Vector {
float X = 0.f;
float Y = 0.f;
float Z = 0.f;
Vector(float X = 0, float Y = 0, float Z = 0) {
this->X = X;
this->Y = Y;
this->Z = Z;
}
Vector operator + (const Vector& input) {
return Vector(this->X + input.X, this->Y + input.Y, this->Z + input.Z);
}
Vector operator - (const Vector& input) {
return Vector(this->X - input.X, this->Y - input.Y, this->Z - input.Z);
}
Vector operator * (const Vector& input) {
return Vector(this->X * input.X, this->Y * input.Y, this->Z * input.Z);
}
Vector operator / (const Vector& input) {
return Vector(this->X / input.X, this->Y / input.Y, this->Z / input.Z);
}
};
typedef Vector QAngle;