mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-05 23:40:34 +08:00
Matrix and Vector printing cleanup
This commit is contained in:
@@ -121,10 +121,10 @@ public:
|
||||
for (size_t i = 0; i < getRows(); i++) {
|
||||
for (size_t j = 0; j < getCols(); j++) {
|
||||
float sig;
|
||||
int exp;
|
||||
int exponent;
|
||||
float num = (*this)(i, j);
|
||||
float2SigExp(num, sig, exp);
|
||||
printf("%6.3fe%03.3d,", (double)sig, exp);
|
||||
float2SigExp(num, sig, exponent);
|
||||
printf("%6.3fe%03d ", (double)sig, exponent);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
@@ -109,10 +109,10 @@ public:
|
||||
inline void print() const {
|
||||
for (size_t i = 0; i < getRows(); i++) {
|
||||
float sig;
|
||||
int exp;
|
||||
int exponent;
|
||||
float num = (*this)(i);
|
||||
float2SigExp(num, sig, exp);
|
||||
printf("%6.3fe%03.3d,", (double)sig, exp);
|
||||
float2SigExp(num, sig, exponent);
|
||||
printf("%6.3fe%03d ", (double)sig, exponent);
|
||||
}
|
||||
|
||||
printf("\n");
|
||||
|
||||
Reference in New Issue
Block a user