diff options
author | Daniel Agar <daniel@agar.ca> | 2015-03-27 19:08:44 -0400 |
---|---|---|
committer | Daniel Agar <daniel@agar.ca> | 2015-03-27 23:38:58 -0400 |
commit | 8aae66b893444c74a22ad7beb89e3828e0444108 (patch) | |
tree | 893833e818d8138360f8fa0bf5554dc6b036f369 /src/lib/mathlib/math | |
parent | 5cc1a5dfdae53626c3cdf35e3d7b60f1a4ca68ed (diff) | |
download | px4-firmware-8aae66b893444c74a22ad7beb89e3828e0444108.tar.gz px4-firmware-8aae66b893444c74a22ad7beb89e3828e0444108.tar.bz2 px4-firmware-8aae66b893444c74a22ad7beb89e3828e0444108.zip |
trivial code style cleanup round 2
Diffstat (limited to 'src/lib/mathlib/math')
-rw-r--r-- | src/lib/mathlib/math/Limits.cpp | 5 | ||||
-rw-r--r-- | src/lib/mathlib/math/Limits.hpp | 3 | ||||
-rw-r--r-- | src/lib/mathlib/math/test/test.cpp | 6 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/mathlib/math/Limits.cpp b/src/lib/mathlib/math/Limits.cpp index e16f33bd6..0ae545f1a 100644 --- a/src/lib/mathlib/math/Limits.cpp +++ b/src/lib/mathlib/math/Limits.cpp @@ -44,9 +44,10 @@ #include "Limits.hpp" -namespace math { +namespace math +{ -#ifndef CONFIG_ARCH_ARM +#ifndef CONFIG_ARCH_ARM #define M_PI_F 3.14159265358979323846f #endif diff --git a/src/lib/mathlib/math/Limits.hpp b/src/lib/mathlib/math/Limits.hpp index fca4197b8..f04d72507 100644 --- a/src/lib/mathlib/math/Limits.hpp +++ b/src/lib/mathlib/math/Limits.hpp @@ -42,7 +42,8 @@ #include <platforms/px4_defines.h> #include <stdint.h> -namespace math { +namespace math +{ float __EXPORT min(float val1, float val2); diff --git a/src/lib/mathlib/math/test/test.cpp b/src/lib/mathlib/math/test/test.cpp index 2fa2f7e7c..c52771ab8 100644 --- a/src/lib/mathlib/math/test/test.cpp +++ b/src/lib/mathlib/math/test/test.cpp @@ -51,7 +51,7 @@ bool __EXPORT equal(float a, float b, float epsilon) printf("not equal ->\n\ta: %12.8f\n\tb: %12.8f\n", double(a), double(b)); return false; - } else return true; + } else { return true; } } void __EXPORT float2SigExp( @@ -84,10 +84,10 @@ void __EXPORT float2SigExp( // cheap power since it is integer if (exp > 0) { - for (int i = 0; i < abs(exp); i++) sig /= 10; + for (int i = 0; i < abs(exp); i++) { sig /= 10; } } else { - for (int i = 0; i < abs(exp); i++) sig *= 10; + for (int i = 0; i < abs(exp); i++) { sig *= 10; } } } |