mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 01:23:34 +08:00
use gcc attributes to align and pack
This commit is contained in:
committed by
Lorenz Meier
parent
76387b1693
commit
eb29b33620
@@ -52,6 +52,16 @@ get_rot_matrix(enum Rotation rot, math::Matrix<3, 3> *rot_matrix)
|
||||
|
||||
#define HALF_SQRT_2 0.70710678118654757f
|
||||
|
||||
__EXPORT void
|
||||
rotate_3f(enum Rotation rot, float *x, float *y, float *z)
|
||||
{
|
||||
float &x2 = *x;
|
||||
float &y2 = *y;
|
||||
float &z2 = *z;
|
||||
|
||||
rotate_3f(rot, x2, y2, z2);
|
||||
}
|
||||
|
||||
__EXPORT void
|
||||
rotate_3f(enum Rotation rot, float &x, float &y, float &z)
|
||||
{
|
||||
|
||||
@@ -130,6 +130,11 @@ const rot_lookup_t rot_lookup[] = {
|
||||
__EXPORT void
|
||||
get_rot_matrix(enum Rotation rot, math::Matrix<3, 3> *rot_matrix);
|
||||
|
||||
/**
|
||||
* rotate a 3 element float vector in-place
|
||||
*/
|
||||
__EXPORT void
|
||||
rotate_3f(enum Rotation rot, float *x, float *y, float *z);
|
||||
|
||||
/**
|
||||
* rotate a 3 element float vector in-place
|
||||
|
||||
Reference in New Issue
Block a user