реорганизация функций проекта, уменьшение дублирующегося кода
This commit is contained in:
parent
6c0ae92ed4
commit
07623b2aa6
10 changed files with 84 additions and 67 deletions
|
@ -122,7 +122,7 @@ void bgc_versor_set_crude_turn_fp32(const float x1, const float x2, const float
|
|||
|
||||
const float sine = sinf(half_angle);
|
||||
|
||||
if (-BGC_EPSYLON_FP32 <= sine && sine <= BGC_EPSYLON_FP32) {
|
||||
if (bgc_is_zero_fp32(sine)) {
|
||||
bgc_versor_reset_fp32(result);
|
||||
return;
|
||||
}
|
||||
|
@ -145,7 +145,7 @@ void bgc_versor_set_crude_turn_fp64(const double x1, const double x2, const doub
|
|||
|
||||
const double sine = sin(half_angle);
|
||||
|
||||
if (-BGC_EPSYLON_FP64 <= sine && sine <= BGC_EPSYLON_FP64) {
|
||||
if (bgc_is_zero_fp64(sine)) {
|
||||
bgc_versor_reset_fp64(result);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue