Skip to content

Commit

Permalink
Fix warning: suggest braces around initialization of subobject
Browse files Browse the repository at this point in the history
  • Loading branch information
jhasse committed Jul 16, 2024
1 parent 0e78df3 commit 86c5961
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/jngl/Vec2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ bool Vec2::isNull() const {
}

void Vec2::rotate(float angle) {
boost::qvm::mat<float, 2, 2> rotationMatrix = { std::cos(angle), -std::sin(angle),
std::sin(angle), std::cos(angle) };
boost::qvm::mat<float, 2, 2> rotationMatrix = { { { std::cos(angle), -std::sin(angle) },
{ std::sin(angle), std::cos(angle) } } };
*this = rotationMatrix * *this;
}

Expand Down

0 comments on commit 86c5961

Please sign in to comment.