Небольшие исправления, а также добавление гомогенного трёхмерного вектора
This commit is contained in:
parent
03627f4401
commit
043cc72c81
25 changed files with 1686 additions and 1644 deletions
|
|
@ -97,12 +97,12 @@ inline double bgc_fp64_quaternion_get_modulus(const BGC_FP64_Quaternion* quatern
|
|||
|
||||
inline int bgc_fp32_quaternion_is_zero(const BGC_FP32_Quaternion* quaternion)
|
||||
{
|
||||
return bgc_fp32_quaternion_get_square_modulus(quaternion) <= BGC_FP32_SQUARE_EPSYLON;
|
||||
return bgc_fp32_quaternion_get_square_modulus(quaternion) <= BGC_FP32_SQUARE_EPSILON;
|
||||
}
|
||||
|
||||
inline int bgc_fp64_quaternion_is_zero(const BGC_FP64_Quaternion* quaternion)
|
||||
{
|
||||
return bgc_fp64_quaternion_get_square_modulus(quaternion) <= BGC_FP64_SQUARE_EPSYLON;
|
||||
return bgc_fp64_quaternion_get_square_modulus(quaternion) <= BGC_FP64_SQUARE_EPSILON;
|
||||
}
|
||||
|
||||
// ================== Is Unit =================== //
|
||||
|
|
@ -295,7 +295,7 @@ inline int bgc_fp32_quaternion_get_ratio(BGC_FP32_Quaternion* quotient, const BG
|
|||
{
|
||||
const float square_modulus = bgc_fp32_quaternion_get_square_modulus(divisor);
|
||||
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -318,7 +318,7 @@ inline int bgc_fp64_quaternion_get_ratio(BGC_FP64_Quaternion* quotient, const BG
|
|||
{
|
||||
const double square_modulus = bgc_fp64_quaternion_get_square_modulus(divisor);
|
||||
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -477,7 +477,7 @@ inline int bgc_fp32_quaternion_get_inverse(BGC_FP32_Quaternion* inverse, const B
|
|||
{
|
||||
const float square_modulus = bgc_fp32_quaternion_get_square_modulus(quaternion);
|
||||
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -495,7 +495,7 @@ inline int bgc_fp64_quaternion_get_inverse(BGC_FP64_Quaternion* inverse, const B
|
|||
{
|
||||
const double square_modulus = bgc_fp64_quaternion_get_square_modulus(quaternion);
|
||||
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -529,7 +529,7 @@ inline int bgc_fp32_quaternion_normalize(BGC_FP32_Quaternion* quaternion)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||