AP_Math: remove use of Vector3 as function

This commit is contained in:
Peter Barker 2020-06-04 15:54:29 +10:00 committed by Andrew Tridgell
parent 0f2bcea647
commit 2f8c0dd65b
3 changed files with 5 additions and 11 deletions

View File

@ -427,10 +427,10 @@ int AP_GeodesicGrid::_triangle_index(const Vector3f &v, bool inclusive)
w.z = -w.z;
break;
case 1:
w(w.y, w.z, -w.x);
w = {w.y, w.z, -w.x};
break;
case 2:
w(w.z, w.x, -w.y);
w = {w.z, w.x, -w.y};
break;
}

View File

@ -62,9 +62,9 @@ void Matrix3<T>::to_euler(float *roll, float *pitch, float *yaw) const
template <typename T>
void Matrix3<T>::from_rotation(enum Rotation rotation)
{
(*this).a(1,0,0);
(*this).b(0,1,0);
(*this).c(0,0,1);
(*this).a = {1,0,0};
(*this).b = {0,1,0};
(*this).c = {0,0,1};
(*this).a.rotate(rotation);
(*this).b.rotate(rotation);

View File

@ -78,12 +78,6 @@ public:
, y(y0)
, z(z0) {}
// function call operator
void operator ()(const T x0, const T y0, const T z0)
{
x= x0; y= y0; z= z0;
}
// test for equality
bool operator ==(const Vector3<T> &v) const;