From 072ec009304c0d64f8dbf110176fb026583f0af2 Mon Sep 17 00:00:00 2001 From: aixxe Date: Mon, 19 Dec 2016 21:12:49 +0000 Subject: [PATCH] Add basic placeholder Vector class. Signed-off-by: aixxe --- include/cstrike/Structures/Vector.h | 31 +++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 include/cstrike/Structures/Vector.h diff --git a/include/cstrike/Structures/Vector.h b/include/cstrike/Structures/Vector.h new file mode 100644 index 0000000..7bf26ca --- /dev/null +++ b/include/cstrike/Structures/Vector.h @@ -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; \ No newline at end of file