Переименование методов на распространённые названия

This commit is contained in:
Andrey Pokidov 2026-02-16 20:41:45 +07:00
parent 039b26305a
commit b621191698
14 changed files with 192 additions and 192 deletions

View file

@ -6,11 +6,11 @@ extern inline void bgc_fp64_vector2_reset(BGC_FP64_Vector2* vector);
extern inline void bgc_fp32_vector2_make(BGC_FP32_Vector2* destination, const float x1, const float x2);
extern inline void bgc_fp64_vector2_make(BGC_FP64_Vector2* destination, const double x1, const double x2);
extern inline float bgc_fp32_vector2_get_square_modulus(const BGC_FP32_Vector2* vector);
extern inline double bgc_fp64_vector2_get_square_modulus(const BGC_FP64_Vector2* vector);
extern inline float bgc_fp32_vector2_get_squared_length(const BGC_FP32_Vector2* vector);
extern inline double bgc_fp64_vector2_get_squared_length(const BGC_FP64_Vector2* vector);
extern inline float bgc_fp32_vector2_get_modulus(const BGC_FP32_Vector2* vector);
extern inline double bgc_fp64_vector2_get_modulus(const BGC_FP64_Vector2* vector);
extern inline float bgc_fp32_vector2_get_length(const BGC_FP32_Vector2* vector);
extern inline double bgc_fp64_vector2_get_length(const BGC_FP64_Vector2* vector);
extern inline int bgc_fp32_vector2_is_zero(const BGC_FP32_Vector2* vector);
extern inline int bgc_fp64_vector2_is_zero(const BGC_FP64_Vector2* vector);
@ -103,14 +103,14 @@ extern inline int bgc_fp64_vector2_get_attitude(const BGC_FP64_Vector2* vector1,
float bgc_fp32_vector2_get_angle(const BGC_FP32_Vector2* vector1, const BGC_FP32_Vector2* vector2, const int angle_unit)
{
const float square_modulus1 = bgc_fp32_vector2_get_square_modulus(vector1);
const float square_modulus1 = bgc_fp32_vector2_get_squared_length(vector1);
// square_modulus1 != square_modulus1 is check for NaN value at square_modulus1
if (square_modulus1 <= BGC_FP32_SQUARE_EPSILON || isnan(square_modulus1)) {
return 0.0f;
}
const float square_modulus2 = bgc_fp32_vector2_get_square_modulus(vector2);
const float square_modulus2 = bgc_fp32_vector2_get_squared_length(vector2);
// square_modulus2 != square_modulus2 is check for NaN value at square_modulus2
if (square_modulus2 <= BGC_FP32_SQUARE_EPSILON || isnan(square_modulus2)) {
@ -128,14 +128,14 @@ float bgc_fp32_vector2_get_angle(const BGC_FP32_Vector2* vector1, const BGC_FP32
double bgc_fp64_vector2_get_angle(const BGC_FP64_Vector2* vector1, const BGC_FP64_Vector2* vector2, const int angle_unit)
{
const double square_modulus1 = bgc_fp64_vector2_get_square_modulus(vector1);
const double square_modulus1 = bgc_fp64_vector2_get_squared_length(vector1);
// square_modulus1 != square_modulus1 is check for NaN value at square_modulus1
if (square_modulus1 <= BGC_FP64_SQUARE_EPSILON || isnan(square_modulus1)) {
return 0.0;
}
const double square_modulus2 = bgc_fp64_vector2_get_square_modulus(vector2);
const double square_modulus2 = bgc_fp64_vector2_get_squared_length(vector2);
// square_modulus2 != square_modulus2 is check for NaN value at square_modulus2
if (square_modulus2 <= BGC_FP64_SQUARE_EPSILON || isnan(square_modulus2)) {