Переименование функций для универсализации названий, добавление функций умножения вектора на дуальное число, а также исправление реализации функции умножения кватерниона на дуальное число на более безопасную реализацию

This commit is contained in:
Andrey Pokidov 2026-03-27 20:54:11 +07:00
parent 405af2f3a7
commit 078512c3d5
10 changed files with 234 additions and 98 deletions

View file

@ -272,7 +272,7 @@ static inline int _bgc_fp32_turn3_get_orthogonal_pair(BGC_FP32_Vector3* const un
return _BGC_ERROR_TURN3_EMPTY_BRANCH;
}
bgc_fp32_vector3_multiply_by_real(unit_main, main, sqrtf(1.0f / main_square_modulus));
bgc_fp32_vector3_multiply_by_real_number(unit_main, main, sqrtf(1.0f / main_square_modulus));
bgc_fp32_vector3_add_scaled(unit_branch, branch, unit_main, -bgc_fp32_vector3_get_dot_product(branch, unit_main));
@ -282,7 +282,7 @@ static inline int _bgc_fp32_turn3_get_orthogonal_pair(BGC_FP32_Vector3* const un
return _BGC_ERROR_TURN3_PAIR_PARALLEL;
}
bgc_fp32_vector3_multiply_by_real(unit_branch, unit_branch, sqrtf(1.0f / orthogonal_square_modulus));
bgc_fp32_vector3_multiply_by_real_number(unit_branch, unit_branch, sqrtf(1.0f / orthogonal_square_modulus));
return BGC_SUCCESS;
}
@ -301,7 +301,7 @@ static inline int _bgc_fp64_turn3_get_orthogonal_pair(BGC_FP64_Vector3* const un
return _BGC_ERROR_TURN3_EMPTY_BRANCH;
}
bgc_fp64_vector3_multiply_by_real(unit_main, main, sqrt(1.0 / main_square_modulus));
bgc_fp64_vector3_multiply_by_real_number(unit_main, main, sqrt(1.0 / main_square_modulus));
bgc_fp64_vector3_add_scaled(unit_branch, branch, unit_main, -bgc_fp64_vector3_get_dot_product(branch, unit_main));
@ -311,7 +311,7 @@ static inline int _bgc_fp64_turn3_get_orthogonal_pair(BGC_FP64_Vector3* const un
return _BGC_ERROR_TURN3_PAIR_PARALLEL;
}
bgc_fp64_vector3_multiply_by_real(unit_branch, unit_branch, sqrt(1.0 / orthogonal_square_modulus));
bgc_fp64_vector3_multiply_by_real_number(unit_branch, unit_branch, sqrt(1.0 / orthogonal_square_modulus));
return BGC_SUCCESS;
}