Skip to content

Commit

Permalink
update changelogs
Browse files Browse the repository at this point in the history
  • Loading branch information
maihd committed Jun 6, 2024
1 parent f879d33 commit 23206e9
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
3 changes: 2 additions & 1 deletion changelogs/CHANGELOGS_v0.7.0-dev.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
- Add vecx_zero
- Add system name or perspective/ortho/frustum, only support right handed now
- Remove ++/-- operators
- Update matrix fields name rowx -> vx, support both row/col major, but now only have col-major functions
- Update matrix fields name rowx -> vx, support both row/col major, but now only have col-major functions
- Remove mat4_div_mat4 and its operator overloading
31 changes: 20 additions & 11 deletions include/vectormath/vectormath_operators.h
Original file line number Diff line number Diff line change
Expand Up @@ -465,12 +465,14 @@ __forceinline mat4 operator-(mat4 m)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator+(mat4 m)
{
return m;
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator+(mat4 a, mat4 b)
{
return mat4_new(
Expand All @@ -482,6 +484,7 @@ __forceinline mat4 operator+(mat4 a, mat4 b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator+(mat4 a, float b)
{
return mat4_new(
Expand All @@ -493,6 +496,7 @@ __forceinline mat4 operator+(mat4 a, float b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator+(float a, mat4 b)
{
return mat4_new(
Expand All @@ -504,6 +508,7 @@ __forceinline mat4 operator+(float a, mat4 b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator-(mat4 a, mat4 b)
{
return mat4_new(
Expand All @@ -515,6 +520,7 @@ __forceinline mat4 operator-(mat4 a, mat4 b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator-(mat4 a, float b)
{
return mat4_new(
Expand All @@ -526,6 +532,7 @@ __forceinline mat4 operator-(mat4 a, float b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator-(float a, mat4 b)
{
return mat4_new(
Expand All @@ -537,53 +544,49 @@ __forceinline mat4 operator-(float a, mat4 b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator*(mat4 a, mat4 b)
{
return mat4_mul(a, b);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline vec2 operator*(mat4 a, vec2 b)
{
return mat4_mul_vec2(a, b);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline vec3 operator*(mat4 a, vec3 b)
{
return mat4_mul_vec3(a, b);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline vec4 operator*(mat4 a, vec4 b)
{
return mat4_mul_vec4(a, b);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator*(mat4 a, float b)
{
return mat4_mul1(a, b);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator*(float a, mat4 b)
{
return mat4_mul1(b, a);
}


__forceinline mat4 operator/(mat4 a, mat4 b)
{
return mat4_new(
a.col0 / b.col0,
a.col1 / b.col1,
a.col2 / b.col2,
a.col3 / b.col3
);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator/(mat4 a, float b)
{
return mat4_new(
Expand All @@ -595,6 +598,7 @@ __forceinline mat4 operator/(mat4 a, float b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4 operator/(float a, mat4 b)
{
return mat4_new(
Expand All @@ -606,6 +610,7 @@ __forceinline mat4 operator/(float a, mat4 b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4& operator+=(mat4& a, mat4 b)
{
return (a = a + b);
Expand All @@ -618,6 +623,7 @@ __forceinline mat4& operator+=(mat4& a, float b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4& operator-=(mat4& a, mat4 b)
{
return (a = a - b);
Expand All @@ -630,6 +636,7 @@ __forceinline mat4& operator-=(mat4& a, float b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline mat4& operator*=(mat4& a, mat4 b)
{
return (a = a * b);
Expand All @@ -648,12 +655,14 @@ __forceinline mat4& operator/=(mat4& a, float b)
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline bool operator==(mat4 a, mat4 b)
{
return mat4_equal(a, b);
}


// @todo: expr to use `const mat4&` instead of `mat4`
__forceinline bool operator!=(mat4 a, mat4 b)
{
return mat4_not_equal(a, b);
Expand Down

0 comments on commit 23206e9

Please sign in to comment.