JSBSim Flight Dynamics Model  1.0 (02 March 2017)
An Open Source Flight Dynamics and Control Software Library in C++
FGMatrix33 Class Reference

Handles matrix math operations. More...

#include <FGMatrix33.h>

Public Types

enum  { eRows = 3, eColumns = 3 }
 

Public Member Functions

 FGMatrix33 (void)
 Default initializer. More...
 
 FGMatrix33 (const FGMatrix33 &M)
 Copy constructor. More...
 
 FGMatrix33 (const double m11, const double m12, const double m13, const double m21, const double m22, const double m23, const double m31, const double m32, const double m33)
 Initialization by given values. More...
 
 ~FGMatrix33 (void)
 Destructor.
 
unsigned int Cols (void) const
 Number of cloumns in the matrix. More...
 
double Determinant (void) const
 Determinant of the matrix. More...
 
std::string Dump (const std::string &delimeter) const
 Prints the contents of the matrix. More...
 
std::string Dump (const std::string &delimiter, const std::string &prefix) const
 Prints the contents of the matrix. More...
 
double Entry (unsigned int row, unsigned int col) const
 Read access the entries of the matrix. More...
 
double & Entry (unsigned int row, unsigned int col)
 Write access the entries of the matrix. More...
 
FGColumnVector3 GetEuler () const
 Returns the Euler angle column vector associated with this matrix.
 
FGQuaternion GetQuaternion (void) const
 Returns the quaternion associated with this direction cosine (rotation) matrix.
 
void InitMatrix (void)
 Initialize the matrix. More...
 
void InitMatrix (const double m11, const double m12, const double m13, const double m21, const double m22, const double m23, const double m31, const double m32, const double m33)
 Initialize the matrix. More...
 
FGMatrix33 Inverse (void) const
 Return the inverse of the matrix. More...
 
bool Invertible (void) const
 Return if the matrix is invertible. More...
 
double operator() (unsigned int row, unsigned int col) const
 Read access the entries of the matrix. More...
 
double & operator() (unsigned int row, unsigned int col)
 Write access the entries of the matrix. More...
 
FGColumnVector3 operator* (const FGColumnVector3 &v) const
 Matrix vector multiplication. More...
 
FGMatrix33 operator* (const FGMatrix33 &B) const
 Matrix product. More...
 
FGMatrix33 operator* (const double scalar) const
 Multiply the matrix with a scalar. More...
 
FGMatrix33operator*= (const FGMatrix33 &B)
 In place matrix multiplication. More...
 
FGMatrix33operator*= (const double scalar)
 In place matrix scale. More...
 
FGMatrix33 operator+ (const FGMatrix33 &B) const
 Matrix addition. More...
 
FGMatrix33operator+= (const FGMatrix33 &B)
 In place matrix addition. More...
 
FGMatrix33 operator- (const FGMatrix33 &B) const
 Matrix subtraction. More...
 
FGMatrix33operator-= (const FGMatrix33 &B)
 In place matrix subtraction. More...
 
FGMatrix33 operator/ (const double scalar) const
 Multiply the matrix with 1.0/scalar. More...
 
FGMatrix33operator/= (const double scalar)
 In place matrix scale. More...
 
FGMatrix33operator= (const FGMatrix33 &A)
 Assignment operator. More...
 
unsigned int Rows (void) const
 Number of rows in the matrix. More...
 
void T (void)
 Transposes this matrix. More...
 
FGMatrix33 Transposed (void) const
 Transposed matrix. More...
 

Detailed Description

Handles matrix math operations.

Author
Tony Peden, Jon Berndt, Mathias Froelich

Definition at line 92 of file FGMatrix33.h.

Constructor & Destructor Documentation

◆ FGMatrix33() [1/3]

FGMatrix33 ( void  )

Default initializer.

Create a zero matrix.

Definition at line 61 of file FGMatrix33.cpp.

62 {
63  data[0] = data[1] = data[2] = data[3] = data[4] = data[5] =
64  data[6] = data[7] = data[8] = 0.0;
65 }

◆ FGMatrix33() [2/3]

FGMatrix33 ( const FGMatrix33 M)
inline

Copy constructor.

Parameters
MMatrix which is used for initialization.

Create copy of the matrix given in the argument.

Definition at line 113 of file FGMatrix33.h.

114  {
115  data[0] = M.data[0];
116  data[1] = M.data[1];
117  data[2] = M.data[2];
118  data[3] = M.data[3];
119  data[4] = M.data[4];
120  data[5] = M.data[5];
121  data[6] = M.data[6];
122  data[7] = M.data[7];
123  data[8] = M.data[8];
124  }

◆ FGMatrix33() [3/3]

FGMatrix33 ( const double  m11,
const double  m12,
const double  m13,
const double  m21,
const double  m22,
const double  m23,
const double  m31,
const double  m32,
const double  m33 
)
inline

Initialization by given values.

Parameters
m11value of the 1,1 Matrix element.
m12value of the 1,2 Matrix element.
m13value of the 1,3 Matrix element.
m21value of the 2,1 Matrix element.
m22value of the 2,2 Matrix element.
m23value of the 2,3 Matrix element.
m31value of the 3,1 Matrix element.
m32value of the 3,2 Matrix element.
m33value of the 3,3 Matrix element.

Create a matrix from the doubles given in the arguments.

Definition at line 140 of file FGMatrix33.h.

143  {
144  data[0] = m11;
145  data[1] = m21;
146  data[2] = m31;
147  data[3] = m12;
148  data[4] = m22;
149  data[5] = m32;
150  data[6] = m13;
151  data[7] = m23;
152  data[8] = m33;
153  }

Member Function Documentation

◆ Cols()

unsigned int Cols ( void  ) const
inline

Number of cloumns in the matrix.

Returns
the number of columns in the matrix.

Definition at line 236 of file FGMatrix33.h.

236 { return eColumns; }
+ Here is the caller graph for this function:

◆ Determinant()

double Determinant ( void  ) const

Determinant of the matrix.

Returns
the determinant of the matrix.

Definition at line 219 of file FGMatrix33.cpp.

219  {
220  return data[0]*data[4]*data[8] + data[3]*data[7]*data[2]
221  + data[6]*data[1]*data[5] - data[6]*data[4]*data[2]
222  - data[3]*data[1]*data[8] - data[7]*data[5]*data[0];
223 }

◆ Dump() [1/2]

string Dump ( const std::string &  delimeter) const

Prints the contents of the matrix.

Parameters
delimeterthe item separator (tab or comma)
Returns
a string with the delimeter-separated contents of the matrix

Definition at line 69 of file FGMatrix33.cpp.

70 {
71  ostringstream buffer;
72  buffer << setw(12) << setprecision(10) << data[0] << delimiter;
73  buffer << setw(12) << setprecision(10) << data[3] << delimiter;
74  buffer << setw(12) << setprecision(10) << data[6] << delimiter;
75  buffer << setw(12) << setprecision(10) << data[1] << delimiter;
76  buffer << setw(12) << setprecision(10) << data[4] << delimiter;
77  buffer << setw(12) << setprecision(10) << data[7] << delimiter;
78  buffer << setw(12) << setprecision(10) << data[2] << delimiter;
79  buffer << setw(12) << setprecision(10) << data[5] << delimiter;
80  buffer << setw(12) << setprecision(10) << data[8];
81  return buffer.str();
82 }
+ Here is the caller graph for this function:

◆ Dump() [2/2]

string Dump ( const std::string &  delimiter,
const std::string &  prefix 
) const

Prints the contents of the matrix.

Parameters
delimeterthe item separator (tab or comma, etc.)
prefixan additional prefix that is used to indent the 3X3 matrix printout
Returns
a string with the delimeter-separated contents of the matrix

Definition at line 86 of file FGMatrix33.cpp.

87 {
88  ostringstream buffer;
89 
90  buffer << prefix << right << fixed << setw(9) << setprecision(6) << data[0] << delimiter;
91  buffer << right << fixed << setw(9) << setprecision(6) << data[3] << delimiter;
92  buffer << right << fixed << setw(9) << setprecision(6) << data[6] << endl;
93 
94  buffer << prefix << right << fixed << setw(9) << setprecision(6) << data[1] << delimiter;
95  buffer << right << fixed << setw(9) << setprecision(6) << data[4] << delimiter;
96  buffer << right << fixed << setw(9) << setprecision(6) << data[7] << endl;
97 
98  buffer << prefix << right << fixed << setw(9) << setprecision(6) << data[2] << delimiter;
99  buffer << right << fixed << setw(9) << setprecision(6) << data[5] << delimiter;
100  buffer << right << fixed << setw(9) << setprecision(6) << data[8];
101 
102  buffer << setw(0) << left;
103 
104  return buffer.str();
105 }

◆ Entry() [1/2]

double Entry ( unsigned int  row,
unsigned int  col 
) const
inline

Read access the entries of the matrix.

This function is just a shortcut for the double& operator()(unsigned int row, unsigned int col) function. It is used internally to access the elements in a more convenient way.

Note that the indices given in the arguments are unchecked.

Parameters
rowRow index.
colColumn index.
Returns
the value of the matrix entry at the given row and column indices. Indices are counted starting with 1.

Definition at line 207 of file FGMatrix33.h.

207  {
208  return data[(col-1)*eRows+row-1];
209  }

◆ Entry() [2/2]

double& Entry ( unsigned int  row,
unsigned int  col 
)
inline

Write access the entries of the matrix.

This function is just a shortcut for the double& operator()(unsigned int row, unsigned int col) function. It is used internally to access the elements in a more convenient way.

Note that the indices given in the arguments are unchecked.

Parameters
rowRow index.
colColumn index.
Returns
a reference to the matrix entry at the given row and column indices. Indices are counted starting with 1.

Definition at line 224 of file FGMatrix33.h.

224  {
225  return data[(col-1)*eRows+row-1];
226  }

◆ InitMatrix() [1/2]

void InitMatrix ( void  )

Initialize the matrix.

This function initializes a matrix to all 0.0.

Definition at line 257 of file FGMatrix33.cpp.

258 {
259  data[0] = data[1] = data[2] = data[3] = data[4] = data[5] =
260  data[6] = data[7] = data[8] = 0.0;
261 }
+ Here is the caller graph for this function:

◆ InitMatrix() [2/2]

void InitMatrix ( const double  m11,
const double  m12,
const double  m13,
const double  m21,
const double  m22,
const double  m23,
const double  m31,
const double  m32,
const double  m33 
)
inline

Initialize the matrix.

This function initializes a matrix to user specified values.

Definition at line 262 of file FGMatrix33.h.

265  {
266  data[0] = m11;
267  data[1] = m21;
268  data[2] = m31;
269  data[3] = m12;
270  data[4] = m22;
271  data[5] = m32;
272  data[6] = m13;
273  data[7] = m23;
274  data[8] = m33;
275  }

◆ Inverse()

FGMatrix33 Inverse ( void  ) const

Return the inverse of the matrix.

Computes and returns if the inverse of the matrix. It is computed by Cramers Rule. Also there are no checks performed if the matrix is invertible. If you are not sure that it really is check this with the Invertible() call before.

Definition at line 227 of file FGMatrix33.cpp.

227  {
228  // Compute the inverse of a general matrix using Cramers rule.
229  // I guess googling for cramers rule gives tons of references
230  // for this. :)
231 
232  if (Determinant() != 0.0) {
233  double rdet = 1.0/Determinant();
234 
235  double i11 = rdet*(data[4]*data[8]-data[7]*data[5]);
236  double i21 = rdet*(data[7]*data[2]-data[1]*data[8]);
237  double i31 = rdet*(data[1]*data[5]-data[4]*data[2]);
238  double i12 = rdet*(data[6]*data[5]-data[3]*data[8]);
239  double i22 = rdet*(data[0]*data[8]-data[6]*data[2]);
240  double i32 = rdet*(data[3]*data[2]-data[0]*data[5]);
241  double i13 = rdet*(data[3]*data[7]-data[6]*data[4]);
242  double i23 = rdet*(data[6]*data[1]-data[0]*data[7]);
243  double i33 = rdet*(data[0]*data[4]-data[3]*data[1]);
244 
245  return FGMatrix33( i11, i12, i13,
246  i21, i22, i23,
247  i31, i32, i33 );
248  } else {
249  return FGMatrix33( 0, 0, 0,
250  0, 0, 0,
251  0, 0, 0 );
252  }
253 }
double Determinant(void) const
Determinant of the matrix.
Definition: FGMatrix33.cpp:219
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61
+ Here is the caller graph for this function:

◆ Invertible()

bool Invertible ( void  ) const
inline

Return if the matrix is invertible.

Checks and returns if the matrix is nonsingular and thus invertible. This is done by simply computing the determinant and check if it is zero. Note that this test does not cover any instabilities caused by nearly singular matirces using finite arithmetics. It only checks exact singularity.

Definition at line 297 of file FGMatrix33.h.

297 { return 0.0 != Determinant(); }
double Determinant(void) const
Determinant of the matrix.
Definition: FGMatrix33.cpp:219

◆ operator()() [1/2]

double operator() ( unsigned int  row,
unsigned int  col 
) const
inline

Read access the entries of the matrix.

Parameters
rowRow index.
colColumn index.
Returns
the value of the matrix entry at the given row and column indices. Indices are counted starting with 1.

Definition at line 177 of file FGMatrix33.h.

177  {
178  return data[(col-1)*eRows+row-1];
179  }

◆ operator()() [2/2]

double& operator() ( unsigned int  row,
unsigned int  col 
)
inline

Write access the entries of the matrix.

Note that the indices given in the arguments are unchecked.

Parameters
rowRow index.
colColumn index.
Returns
a reference to the matrix entry at the given row and column indices. Indices are counted starting with 1.

Definition at line 190 of file FGMatrix33.h.

190  {
191  return data[(col-1)*eRows+row-1];
192  }

◆ operator*() [1/3]

FGColumnVector3 operator* ( const FGColumnVector3 v) const

Matrix vector multiplication.

Parameters
vvector to multiply with.
Returns
matric vector product.

Compute and return the product of the current matrix with the vector given in the argument.

Definition at line 489 of file FGMatrix33.cpp.

490 {
491  double v1 = v(1);
492  double v2 = v(2);
493  double v3 = v(3);
494 
495  double tmp1 = v1*data[0]; //[(col-1)*eRows+row-1]
496  double tmp2 = v1*data[1];
497  double tmp3 = v1*data[2];
498 
499  tmp1 += v2*data[3];
500  tmp2 += v2*data[4];
501  tmp3 += v2*data[5];
502 
503  tmp1 += v3*data[6];
504  tmp2 += v3*data[7];
505  tmp3 += v3*data[8];
506 
507  return FGColumnVector3( tmp1, tmp2, tmp3 );
508 }

◆ operator*() [2/3]

FGMatrix33 operator* ( const FGMatrix33 B) const

Matrix product.

Parameters
Bmatrix to add to.
Returns
product of the matrices.

Compute and return the product of the current matrix and the matrix B given in the argument.

Definition at line 378 of file FGMatrix33.cpp.

379 {
380  FGMatrix33 Product;
381 
382  Product.data[0] = data[0]*M.data[0] + data[3]*M.data[1] + data[6]*M.data[2];
383  Product.data[3] = data[0]*M.data[3] + data[3]*M.data[4] + data[6]*M.data[5];
384  Product.data[6] = data[0]*M.data[6] + data[3]*M.data[7] + data[6]*M.data[8];
385  Product.data[1] = data[1]*M.data[0] + data[4]*M.data[1] + data[7]*M.data[2];
386  Product.data[4] = data[1]*M.data[3] + data[4]*M.data[4] + data[7]*M.data[5];
387  Product.data[7] = data[1]*M.data[6] + data[4]*M.data[7] + data[7]*M.data[8];
388  Product.data[2] = data[2]*M.data[0] + data[5]*M.data[1] + data[8]*M.data[2];
389  Product.data[5] = data[2]*M.data[3] + data[5]*M.data[4] + data[8]*M.data[5];
390  Product.data[8] = data[2]*M.data[6] + data[5]*M.data[7] + data[8]*M.data[8];
391 
392  return Product;
393 }
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61

◆ operator*() [3/3]

FGMatrix33 operator* ( const double  scalar) const

Multiply the matrix with a scalar.

Parameters
scalarscalar factor to multiply with.
Returns
scaled matrix.

Compute and return the product of the current matrix with the scalar value scalar given in the argument.

Definition at line 331 of file FGMatrix33.cpp.

332 {
333  return FGMatrix33( scalar * data[0],
334  scalar * data[3],
335  scalar * data[6],
336  scalar * data[1],
337  scalar * data[4],
338  scalar * data[7],
339  scalar * data[2],
340  scalar * data[5],
341  scalar * data[8] );
342 }
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61

◆ operator*=() [1/2]

FGMatrix33 & operator*= ( const FGMatrix33 B)

In place matrix multiplication.

Parameters
Bmatrix to multiply with.
Returns
reference to the current matrix.

Compute the product of the current matrix and the matrix B given in the argument.

Definition at line 397 of file FGMatrix33.cpp.

398 {
399  // FIXME: Make compiler friendlier
400  double a,b,c;
401 
402  a = data[0]; b=data[3]; c=data[6];
403  data[0] = a*M.data[0] + b*M.data[1] + c*M.data[2];
404  data[3] = a*M.data[3] + b*M.data[4] + c*M.data[5];
405  data[6] = a*M.data[6] + b*M.data[7] + c*M.data[8];
406 
407  a = data[1]; b=data[4]; c=data[7];
408  data[1] = a*M.data[0] + b*M.data[1] + c*M.data[2];
409  data[4] = a*M.data[3] + b*M.data[4] + c*M.data[5];
410  data[7] = a*M.data[6] + b*M.data[7] + c*M.data[8];
411 
412  a = data[2]; b=data[5]; c=data[8];
413  data[2] = a*M.data[0] + b*M.data[1] + c*M.data[2];
414  data[5] = a*M.data[3] + b*M.data[4] + c*M.data[5];
415  data[8] = a*M.data[6] + b*M.data[7] + c*M.data[8];
416 
417  return *this;
418 }

◆ operator*=() [2/2]

FGMatrix33 & operator*= ( const double  scalar)

In place matrix scale.

Parameters
scalarscalar value to multiply with.
Returns
reference to the current matrix.

Compute the product of the current matrix and the scalar value scalar given in the argument.

Definition at line 361 of file FGMatrix33.cpp.

362 {
363  data[0] *= scalar;
364  data[3] *= scalar;
365  data[6] *= scalar;
366  data[1] *= scalar;
367  data[4] *= scalar;
368  data[7] *= scalar;
369  data[2] *= scalar;
370  data[5] *= scalar;
371  data[8] *= scalar;
372 
373  return *this;
374 }

◆ operator+()

FGMatrix33 operator+ ( const FGMatrix33 B) const

Matrix addition.

Parameters
Bmatrix to add to.
Returns
sum of the matrices.

Compute and return the sum of the current matrix and the matrix B given in the argument.

Definition at line 299 of file FGMatrix33.cpp.

300 {
301  return FGMatrix33( data[0] + M.data[0],
302  data[3] + M.data[3],
303  data[6] + M.data[6],
304  data[1] + M.data[1],
305  data[4] + M.data[4],
306  data[7] + M.data[7],
307  data[2] + M.data[2],
308  data[5] + M.data[5],
309  data[8] + M.data[8] );
310 }
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61

◆ operator+=()

FGMatrix33 & operator+= ( const FGMatrix33 B)

In place matrix addition.

Parameters
Bmatrix to add.
Returns
reference to the current matrix.

Compute the sum of the current matrix and the matrix B given in the argument.

Definition at line 314 of file FGMatrix33.cpp.

315 {
316  data[0] += M.data[0];
317  data[3] += M.data[3];
318  data[6] += M.data[6];
319  data[1] += M.data[1];
320  data[4] += M.data[4];
321  data[7] += M.data[7];
322  data[2] += M.data[2];
323  data[5] += M.data[5];
324  data[8] += M.data[8];
325 
326  return *this;
327 }

◆ operator-()

FGMatrix33 operator- ( const FGMatrix33 B) const

Matrix subtraction.

Parameters
Bmatrix to add to.
Returns
difference of the matrices.

Compute and return the sum of the current matrix and the matrix B given in the argument.

Definition at line 267 of file FGMatrix33.cpp.

268 {
269  return FGMatrix33( data[0] - M.data[0],
270  data[3] - M.data[3],
271  data[6] - M.data[6],
272  data[1] - M.data[1],
273  data[4] - M.data[4],
274  data[7] - M.data[7],
275  data[2] - M.data[2],
276  data[5] - M.data[5],
277  data[8] - M.data[8] );
278 }
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61

◆ operator-=()

FGMatrix33 & operator-= ( const FGMatrix33 B)

In place matrix subtraction.

Parameters
Bmatrix to subtract.
Returns
reference to the current matrix.

Compute the diffence from the current matrix and the matrix B given in the argument.

Definition at line 282 of file FGMatrix33.cpp.

283 {
284  data[0] -= M.data[0];
285  data[1] -= M.data[1];
286  data[2] -= M.data[2];
287  data[3] -= M.data[3];
288  data[4] -= M.data[4];
289  data[5] -= M.data[5];
290  data[6] -= M.data[6];
291  data[7] -= M.data[7];
292  data[8] -= M.data[8];
293 
294  return *this;
295 }

◆ operator/()

FGMatrix33 operator/ ( const double  scalar) const

Multiply the matrix with 1.0/scalar.

Parameters
scalarscalar factor to divide through.
Returns
scaled matrix.

Compute and return the product of the current matrix with the scalar value 1.0/scalar, where scalar is given in the argument.

Definition at line 422 of file FGMatrix33.cpp.

423 {
424  FGMatrix33 Quot;
425 
426  if ( scalar != 0 ) {
427  double tmp = 1.0/scalar;
428  Quot.data[0] = data[0] * tmp;
429  Quot.data[3] = data[3] * tmp;
430  Quot.data[6] = data[6] * tmp;
431  Quot.data[1] = data[1] * tmp;
432  Quot.data[4] = data[4] * tmp;
433  Quot.data[7] = data[7] * tmp;
434  Quot.data[2] = data[2] * tmp;
435  Quot.data[5] = data[5] * tmp;
436  Quot.data[8] = data[8] * tmp;
437  } else {
438  MatrixException mE;
439  mE.Message = "Attempt to divide by zero in method FGMatrix33::operator/(const double scalar)";
440  throw mE;
441  }
442  return Quot;
443 }
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61

◆ operator/=()

FGMatrix33 & operator/= ( const double  scalar)

In place matrix scale.

Parameters
scalarscalar value to divide through.
Returns
reference to the current matrix.

Compute the product of the current matrix and the scalar value 1.0/scalar, where scalar is given in the argument.

Definition at line 447 of file FGMatrix33.cpp.

448 {
449  if ( scalar != 0 ) {
450  double tmp = 1.0/scalar;
451  data[0] *= tmp;
452  data[3] *= tmp;
453  data[6] *= tmp;
454  data[1] *= tmp;
455  data[4] *= tmp;
456  data[7] *= tmp;
457  data[2] *= tmp;
458  data[5] *= tmp;
459  data[8] *= tmp;
460  } else {
461  MatrixException mE;
462  mE.Message = "Attempt to divide by zero in method FGMatrix33::operator/=(const double scalar)";
463  throw mE;
464  }
465  return *this;
466 }

◆ operator=()

FGMatrix33& operator= ( const FGMatrix33 A)
inline

Assignment operator.

Parameters
Asource matrix.

Copy the content of the matrix given in the argument into *this.

Definition at line 313 of file FGMatrix33.h.

314  {
315  data[0] = A.data[0];
316  data[1] = A.data[1];
317  data[2] = A.data[2];
318  data[3] = A.data[3];
319  data[4] = A.data[4];
320  data[5] = A.data[5];
321  data[6] = A.data[6];
322  data[7] = A.data[7];
323  data[8] = A.data[8];
324  return *this;
325  }

◆ Rows()

unsigned int Rows ( void  ) const
inline

Number of rows in the matrix.

Returns
the number of rows in the matrix.

Definition at line 231 of file FGMatrix33.h.

231 { return eRows; }
+ Here is the caller graph for this function:

◆ T()

void T ( void  )

Transposes this matrix.

This function only transposes this matrix. Nothing is returned.

Definition at line 470 of file FGMatrix33.cpp.

471 {
472  double tmp;
473 
474  tmp = data[3];
475  data[3] = data[1];
476  data[1] = tmp;
477 
478  tmp = data[6];
479  data[6] = data[2];
480  data[2] = tmp;
481 
482  tmp = data[7];
483  data[7] = data[5];
484  data[5] = tmp;
485 }
+ Here is the caller graph for this function:

◆ Transposed()

FGMatrix33 Transposed ( void  ) const
inline

Transposed matrix.

This function only returns the transpose of this matrix. This matrix itself remains unchanged.

Returns
the transposed matrix.

Definition at line 243 of file FGMatrix33.h.

243  {
244  return FGMatrix33( data[0], data[1], data[2],
245  data[3], data[4], data[5],
246  data[6], data[7], data[8] );
247  }
FGMatrix33(void)
Default initializer.
Definition: FGMatrix33.cpp:61
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: