Changed operator-(const TVectorN<T>& v) to not perform on v.

This commit is contained in:
scorpioblood 2024-05-20 22:43:53 +02:00
parent 122fba35db
commit 626147b82c
2 changed files with 4 additions and 9 deletions

View File

@ -391,10 +391,9 @@ namespace Phanes::Core::Math {
*/ */
template<RealType T> template<RealType T>
void operator- (TVector2<T>& v1) TVector2<T> operator- (const TVector2<T>& v1)
{ {
v1.x = -v1.x; return TVector2<T>&(-v1.x, -v1.y);
v1.y = -v1.y;
} }

View File

@ -408,13 +408,9 @@ namespace Phanes::Core::Math {
*/ */
template<RealType T> template<RealType T>
TVector3<T> operator- (TVector3<T>& v1) TVector3<T> operator- (const TVector3<T>& v1)
{ {
v1.x = -v1.x; return TVector3<T>(-v1.x, -v1.y, -v1.z);
v1.y = -v1.y;
v1.z = -v1.z;
return v1;
} }
/** /**