реорганизация функций проекта, уменьшение дублирующегося кода

This commit is contained in:
Andrey Pokidov 2025-02-04 13:20:46 +07:00
parent 6c0ae92ed4
commit 07623b2aa6
10 changed files with 84 additions and 67 deletions

View file

@ -264,16 +264,12 @@ inline double bgc_matrix3x3_get_determinant_fp64(const BgcMatrix3x3FP64* matrix)
inline int bgc_matrix3x3_is_singular_fp32(const BgcMatrix3x3FP32* matrix)
{
const float determinant = bgc_matrix3x3_get_determinant_fp32(matrix);
return -BGC_EPSYLON_FP32 <= determinant && determinant <= BGC_EPSYLON_FP32;
return bgc_is_zero_fp32(bgc_matrix3x3_get_determinant_fp32(matrix));
}
inline int bgc_matrix3x3_is_singular_fp64(const BgcMatrix3x3FP64* matrix)
{
const double determinant = bgc_matrix3x3_get_determinant_fp64(matrix);
return -BGC_EPSYLON_FP64 <= determinant && determinant <= BGC_EPSYLON_FP64;
return bgc_is_zero_fp64(bgc_matrix3x3_get_determinant_fp64(matrix));
}
// ================= Inversion ================== //