mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-06-28 22:00:35 +08:00
Expand auto-format coverage and tiny style changes
This commit is contained in:
committed by
Mathieu Bresciani
parent
fbdd75da2e
commit
f20726d47f
+7
-23
@@ -42,34 +42,18 @@
|
||||
|
||||
#ifdef ECL_STANDALONE
|
||||
|
||||
namespace math
|
||||
{
|
||||
namespace math {
|
||||
|
||||
float min(float val1, float val2)
|
||||
{
|
||||
return (val1 < val2) ? val1 : val2;
|
||||
}
|
||||
float min(float val1, float val2) { return (val1 < val2) ? val1 : val2; }
|
||||
|
||||
float max(float val1, float val2)
|
||||
{
|
||||
return (val1 > val2) ? val1 : val2;
|
||||
}
|
||||
float max(float val1, float val2) { return (val1 > val2) ? val1 : val2; }
|
||||
|
||||
float constrain(float val, float min, float max)
|
||||
{
|
||||
return (val < min) ? min : ((val > max) ? max : val);
|
||||
}
|
||||
float constrain(float val, float min, float max) { return (val < min) ? min : ((val > max) ? max : val); }
|
||||
|
||||
float radians(float degrees)
|
||||
{
|
||||
return (degrees / 180.0f) * M_PI_F;
|
||||
}
|
||||
float radians(float degrees) { return (degrees / 180.0f) * M_PI_F; }
|
||||
|
||||
float degrees(float radians)
|
||||
{
|
||||
return (radians * 180.0f) / M_PI_F;
|
||||
}
|
||||
float degrees(float radians) { return (radians * 180.0f) / M_PI_F; }
|
||||
|
||||
} // namespace math
|
||||
} // namespace math
|
||||
|
||||
#endif /* ECL_STANDALONE */
|
||||
|
||||
Reference in New Issue
Block a user