From a3aca093bcffdee641dd9ef1f2cf3707cbb843bd Mon Sep 17 00:00:00 2001 From: Lukas Klingsbo Date: Wed, 31 May 2023 22:34:35 +0200 Subject: [PATCH] fix: Revert negation change for Vector2 (#296) --- lib/src/vector_math/vector2.dart | 4 ++-- lib/src/vector_math_64/vector2.dart | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/src/vector_math/vector2.dart b/lib/src/vector_math/vector2.dart index a304dab3..1bcf2991 100644 --- a/lib/src/vector_math/vector2.dart +++ b/lib/src/vector_math/vector2.dart @@ -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. diff --git a/lib/src/vector_math_64/vector2.dart b/lib/src/vector_math_64/vector2.dart index 40f4a6ce..7a622f1b 100644 --- a/lib/src/vector_math_64/vector2.dart +++ b/lib/src/vector_math_64/vector2.dart @@ -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.