Skip to content

Commit

Permalink
fix(matrix): matrix failed constexpr fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
beryll1um committed Feb 19, 2021
1 parent 0106f13 commit 8c019f2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/unified/core/math/matrix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct Matrix
public:

UNIFIED_CONSTEXPR Matrix() {
if UNIFIED_CONSTEXPR (_rows == _columns) {
if (_rows == _columns) {
for (u32 row = 0; row < _rows; row++)
for (u32 col = 0; col < _columns; col++)
if (row == col) _data[row][col] = _type(1);
Expand All @@ -29,7 +29,7 @@ struct Matrix
}

UNIFIED_CONSTEXPR Matrix(const _type &fill) {
if UNIFIED_CONSTEXPR (_rows == _columns) {
if (_rows == _columns) {
for (u32 row = 0; row < _rows; row++)
for (u32 col = 0; col < _columns; col++)
if (row == col) _data[row][col] = fill;
Expand Down

0 comments on commit 8c019f2

Please sign in to comment.