Переименование типов на на общепринятый формат, отказ от суффикса _t, так как он зарезервирован POSIX

This commit is contained in:
Andrey Pokidov 2025-01-15 23:56:17 +07:00
parent 3805354611
commit 0027924f86
26 changed files with 574 additions and 571 deletions

View file

@ -3,13 +3,13 @@
#include "angle.h"
#include "versor.h"
const bgc_versor_fp32_t BGC_IDLE_VERSOR_FP32 = { 1.0f, 0.0f, 0.0f, 0.0f };
const BgcVersorFP32 BGC_IDLE_VERSOR_FP32 = { 1.0f, 0.0f, 0.0f, 0.0f };
const bgc_versor_fp64_t BGC_IDLE_VERSOR_FP64 = { 1.0, 0.0, 0.0, 0.0 };
const BgcVersorFP64 BGC_IDLE_VERSOR_FP64 = { 1.0, 0.0, 0.0, 0.0 };
// =============== Set Crude Turn =============== //
void bgc_versor_set_crude_turn_fp32(const float x1, const float x2, const float x3, const float angle, const bgc_angle_unit_t unit, bgc_versor_fp32_t* result)
void bgc_versor_set_crude_turn_fp32(const float x1, const float x2, const float x3, const float angle, const BgcAngleUnitEnum unit, BgcVersorFP32* result)
{
const float square_vector = x1 * x1 + x2 * x2 + x3 * x3;
@ -32,7 +32,7 @@ void bgc_versor_set_crude_turn_fp32(const float x1, const float x2, const float
bgc_versor_set_values_fp32(cosf(half_angle), x1 * multiplier, x2 * multiplier, x3 * multiplier, result);
}
void bgc_versor_set_crude_turn_fp64(const double x1, const double x2, const double x3, const double angle, const bgc_angle_unit_t unit, bgc_versor_fp64_t* result)
void bgc_versor_set_crude_turn_fp64(const double x1, const double x2, const double x3, const double angle, const BgcAngleUnitEnum unit, BgcVersorFP64* result)
{
const double square_vector = x1 * x1 + x2 * x2 + x3 * x3;
@ -57,7 +57,7 @@ void bgc_versor_set_crude_turn_fp64(const double x1, const double x2, const doub
// ================= Rotation3 ================== //
void bgc_versor_get_rotation_fp32(const bgc_versor_fp32_t* versor, bgc_rotation3_fp32_t* result)
void bgc_versor_get_rotation_fp32(const BgcVersorFP32* versor, BgcRotation3FP32* result)
{
if (versor == 0 || result == 0) {
return;
@ -79,7 +79,7 @@ void bgc_versor_get_rotation_fp32(const bgc_versor_fp32_t* versor, bgc_rotation3
result->axis.x3 = versor->x3 * multiplier;
}
void bgc_versor_get_rotation_fp64(const bgc_versor_fp64_t* versor, bgc_rotation3_fp64_t* result)
void bgc_versor_get_rotation_fp64(const BgcVersorFP64* versor, BgcRotation3FP64* result)
{
if (versor == 0 || result == 0) {
return;