Skip to content

Commit

Permalink
fix: Revert negation change for Vector2 (#296)
Browse files Browse the repository at this point in the history
  • Loading branch information
spydon committed May 31, 2023
1 parent cd87f57 commit a3aca09
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions lib/src/vector_math/vector2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,8 @@ class Vector2 implements Vector {

/// Negate.
void negate() {
_v2storage[1] *= -1;
_v2storage[0] *= -1;
_v2storage[1] = -_v2storage[1];
_v2storage[0] = -_v2storage[0];
}

/// Absolute value.
Expand Down
4 changes: 2 additions & 2 deletions lib/src/vector_math_64/vector2.dart
Original file line number Diff line number Diff line change
Expand Up @@ -335,8 +335,8 @@ class Vector2 implements Vector {

/// Negate.
void negate() {
_v2storage[1] *= -1;
_v2storage[0] *= -1;
_v2storage[1] = -_v2storage[1];
_v2storage[0] = -_v2storage[0];
}

/// Absolute value.
Expand Down

0 comments on commit a3aca09

Please sign in to comment.