diff options
Diffstat (limited to 'primedev/core/math/vector.h')
-rw-r--r-- | primedev/core/math/vector.h | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/primedev/core/math/vector.h b/primedev/core/math/vector.h index e62f2c93..0face732 100644 --- a/primedev/core/math/vector.h +++ b/primedev/core/math/vector.h @@ -17,10 +17,7 @@ public: Vector3(float _f) : x(_f), y(_f), z(_f) {} Vector3() : x(0.0f), y(0.0f), z(0.0f) {} - inline bool IsValid() - { - return IsFinite(x) && IsFinite(y) && IsFinite(z); - } + inline bool IsValid() { return IsFinite(x) && IsFinite(y) && IsFinite(z); } inline void Init(float fX = 0.0f, float fY = 0.0f, float fZ = 0.0f) { @@ -29,10 +26,7 @@ public: z = fZ; } - inline float Length() - { - return FastSqrt(x * x + y * y + z * z); - } + inline float Length() { return FastSqrt(x * x + y * y + z * z); } inline float DistTo(const Vector3& vOther) { @@ -44,10 +38,7 @@ public: return vDelta.Length(); } - float Dot(const Vector3& vOther) const - { - return x * vOther.x + y * vOther.y + z * vOther.z; - } + float Dot(const Vector3& vOther) const { return x * vOther.x + y * vOther.y + z * vOther.z; } // Cross product between two vectors. Vector3 Cross(const Vector3& vOther) const; @@ -318,10 +309,7 @@ public: Vector3 GetNormal() const; // todo: more operators maybe - bool operator==(const QAngle& other) - { - return x == other.x && y == other.y && z == other.z; - } + bool operator==(const QAngle& other) { return x == other.x && y == other.y && z == other.z; } }; inline Vector3 QAngle::GetNormal() const |