mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-18 06:38:29 -04:00
AP_Math: class template parameters not compliant in constructor declaration
This commit is contained in:
parent
772c80a038
commit
e52e64b11c
@ -19,12 +19,12 @@ class MatrixN {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
// constructor from zeros
|
// constructor from zeros
|
||||||
MatrixN<T,N>(void) {
|
MatrixN(void) {
|
||||||
memset(v, 0, sizeof(v));
|
memset(v, 0, sizeof(v));
|
||||||
}
|
}
|
||||||
|
|
||||||
// constructor from 4 diagonals
|
// constructor from 4 diagonals
|
||||||
MatrixN<T,N>(const float d[N]) {
|
MatrixN(const float d[N]) {
|
||||||
memset(v, 0, sizeof(v));
|
memset(v, 0, sizeof(v));
|
||||||
for (uint8_t i = 0; i < N; i++) {
|
for (uint8_t i = 0; i < N; i++) {
|
||||||
v[i][i] = d[i];
|
v[i][i] = d[i];
|
||||||
|
@ -32,20 +32,20 @@ public:
|
|||||||
|
|
||||||
// constructor creates a quaternion equivalent
|
// constructor creates a quaternion equivalent
|
||||||
// to roll=0, pitch=0, yaw=0
|
// to roll=0, pitch=0, yaw=0
|
||||||
QuaternionT<T>()
|
QuaternionT()
|
||||||
{
|
{
|
||||||
q1 = 1;
|
q1 = 1;
|
||||||
q2 = q3 = q4 = 0;
|
q2 = q3 = q4 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
// setting constructor
|
// setting constructor
|
||||||
QuaternionT<T>(const T _q1, const T _q2, const T _q3, const T _q4) :
|
QuaternionT(const T _q1, const T _q2, const T _q3, const T _q4) :
|
||||||
q1(_q1), q2(_q2), q3(_q3), q4(_q4)
|
q1(_q1), q2(_q2), q3(_q3), q4(_q4)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
// setting constructor
|
// setting constructor
|
||||||
QuaternionT<T>(const T _q[4]) :
|
QuaternionT(const T _q[4]) :
|
||||||
q1(_q[0]), q2(_q[1]), q3(_q[2]), q4(_q[3])
|
q1(_q[0]), q2(_q[1]), q3(_q[2]), q4(_q[3])
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user