Changed operator-(const TVectorN<T>& v) to not perform on v.
This commit is contained in:
parent
122fba35db
commit
626147b82c
@ -391,10 +391,9 @@ namespace Phanes::Core::Math {
|
||||
*/
|
||||
|
||||
template<RealType T>
|
||||
void operator- (TVector2<T>& v1)
|
||||
TVector2<T> operator- (const TVector2<T>& v1)
|
||||
{
|
||||
v1.x = -v1.x;
|
||||
v1.y = -v1.y;
|
||||
return TVector2<T>&(-v1.x, -v1.y);
|
||||
}
|
||||
|
||||
|
||||
|
@ -408,13 +408,9 @@ namespace Phanes::Core::Math {
|
||||
*/
|
||||
|
||||
template<RealType T>
|
||||
TVector3<T> operator- (TVector3<T>& v1)
|
||||
TVector3<T> operator- (const TVector3<T>& v1)
|
||||
{
|
||||
v1.x = -v1.x;
|
||||
v1.y = -v1.y;
|
||||
v1.z = -v1.z;
|
||||
|
||||
return v1;
|
||||
return TVector3<T>(-v1.x, -v1.y, -v1.z);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user