cleanup in vec4

This commit is contained in:
h4570
2022-08-15 01:36:43 +02:00
parent ae0d5c52fd
commit 3af2493068
2 changed files with 82 additions and 55 deletions
+25 -9
View File
@@ -50,18 +50,34 @@ class Vec4 {
/** Initialize Vec4 with float[4] values */
explicit Vec4(const float* v) { copy(this, v); }
Vec4 operator+(const Vec4& v) const;
Vec4 operator-(const Vec4& v) const;
/** Cross product */
Vec4 operator*(const Vec4& v) const;
Vec4 operator*(const float& v) const;
Vec4 operator/(const float& v) const;
Vec4 operator/(const Vec4& v) const;
Vec4 operator-(void) const;
/** copy */
void operator=(const Vec4& v);
/** negate xyz */
Vec4 operator-(void) const;
/** xyz + xyz */
Vec4 operator+(const Vec4& v) const;
void operator+=(const Vec4& v);
void operator*=(const float& v);
/** xyz - xyz */
Vec4 operator-(const Vec4& v) const;
void operator-=(const Vec4& v);
/** xyzw * xyzw */
Vec4 operator*(const Vec4& v) const;
void operator*=(const Vec4& v);
/** xyzw / xyzw */
Vec4 operator/(const Vec4& v) const;
void operator/=(const Vec4& v);
/** xyz * v */
Vec4 operator*(const float& v) const;
void operator*=(const float& v);
/** xyz / v */
Vec4 operator/(const float& v) const;
void operator/=(const float& v);
/** (0,0,0,1) */