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>
|
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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user