Переименование типов на на общепринятый формат, отказ от суффикса _t, так как он зарезервирован POSIX
This commit is contained in:
parent
3805354611
commit
0027924f86
26 changed files with 574 additions and 571 deletions
|
@ -6,22 +6,22 @@
|
|||
#include "vector3.h"
|
||||
|
||||
typedef struct {
|
||||
bgc_vector3_fp32_t axis;
|
||||
BgcVector3FP32 axis;
|
||||
float radians;
|
||||
} bgc_rotation3_fp32_t;
|
||||
} BgcRotation3FP32;
|
||||
|
||||
typedef struct {
|
||||
bgc_vector3_fp64_t axis;
|
||||
BgcVector3FP64 axis;
|
||||
double radians;
|
||||
} bgc_rotation3_fp64_t;
|
||||
} BgcRotation3FP64;
|
||||
|
||||
extern const bgc_rotation3_fp32_t BGC_IDLE_ROTATION3_FP32;
|
||||
extern const BgcRotation3FP32 BGC_IDLE_ROTATION3_FP32;
|
||||
|
||||
extern const bgc_rotation3_fp64_t BGC_IDLE_ROTATION3_FP64;
|
||||
extern const BgcRotation3FP64 BGC_IDLE_ROTATION3_FP64;
|
||||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void bgc_rotation3_reset_fp32(bgc_rotation3_fp32_t* rotation)
|
||||
inline void bgc_rotation3_reset_fp32(BgcRotation3FP32* rotation)
|
||||
{
|
||||
rotation->axis.x1 = 0.0f;
|
||||
rotation->axis.x2 = 0.0f;
|
||||
|
@ -30,7 +30,7 @@ inline void bgc_rotation3_reset_fp32(bgc_rotation3_fp32_t* rotation)
|
|||
rotation->radians = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_rotation3_reset_fp64(bgc_rotation3_fp64_t* rotation)
|
||||
inline void bgc_rotation3_reset_fp64(BgcRotation3FP64* rotation)
|
||||
{
|
||||
rotation->axis.x1 = 0.0;
|
||||
rotation->axis.x2 = 0.0;
|
||||
|
@ -41,7 +41,7 @@ inline void bgc_rotation3_reset_fp64(bgc_rotation3_fp64_t* rotation)
|
|||
|
||||
// ==================== Make ==================== //
|
||||
|
||||
inline void bgc_rotation3_set_values_fp32(const float x1, const float x2, const float x3, const float angle, const bgc_angle_unit_t unit, bgc_rotation3_fp32_t* rotation)
|
||||
inline void bgc_rotation3_set_values_fp32(const float x1, const float x2, const float x3, const float angle, const BgcAngleUnitEnum unit, BgcRotation3FP32* rotation)
|
||||
{
|
||||
rotation->axis.x1 = x1;
|
||||
rotation->axis.x2 = x2;
|
||||
|
@ -56,7 +56,7 @@ inline void bgc_rotation3_set_values_fp32(const float x1, const float x2, const
|
|||
}
|
||||
|
||||
|
||||
inline void bgc_rotation3_set_values_fp64(const double x1, const double x2, const double x3, const double angle, const bgc_angle_unit_t unit, bgc_rotation3_fp64_t* rotation)
|
||||
inline void bgc_rotation3_set_values_fp64(const double x1, const double x2, const double x3, const double angle, const BgcAngleUnitEnum unit, BgcRotation3FP64* rotation)
|
||||
{
|
||||
rotation->axis.x1 = x1;
|
||||
rotation->axis.x2 = x2;
|
||||
|
@ -70,7 +70,7 @@ inline void bgc_rotation3_set_values_fp64(const double x1, const double x2, cons
|
|||
}
|
||||
}
|
||||
|
||||
inline void bgc_rotation3_set_with_axis_fp32(const bgc_vector3_fp32_t* axis, const float angle, const bgc_angle_unit_t unit, bgc_rotation3_fp32_t* rotation)
|
||||
inline void bgc_rotation3_set_with_axis_fp32(const BgcVector3FP32* axis, const float angle, const BgcAngleUnitEnum unit, BgcRotation3FP32* rotation)
|
||||
{
|
||||
rotation->axis.x1 = axis->x1;
|
||||
rotation->axis.x2 = axis->x2;
|
||||
|
@ -84,7 +84,7 @@ inline void bgc_rotation3_set_with_axis_fp32(const bgc_vector3_fp32_t* axis, con
|
|||
}
|
||||
}
|
||||
|
||||
inline void bgc_rotation3_set_with_axis_fp64(const bgc_vector3_fp64_t* axis, const double angle, const bgc_angle_unit_t unit, bgc_rotation3_fp64_t* rotation)
|
||||
inline void bgc_rotation3_set_with_axis_fp64(const BgcVector3FP64* axis, const double angle, const BgcAngleUnitEnum unit, BgcRotation3FP64* rotation)
|
||||
{
|
||||
rotation->axis.x1 = axis->x1;
|
||||
rotation->axis.x2 = axis->x2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue