Небольшие исправления, а также добавление гомогенного трёхмерного вектора
This commit is contained in:
parent
03627f4401
commit
043cc72c81
25 changed files with 1686 additions and 1644 deletions
|
|
@ -70,12 +70,12 @@ inline double bgc_fp64_vector2_get_modulus(const BGC_FP64_Vector2* vector)
|
|||
|
||||
inline int bgc_fp32_vector2_is_zero(const BGC_FP32_Vector2* vector)
|
||||
{
|
||||
return bgc_fp32_vector2_get_square_modulus(vector) <= BGC_FP32_SQUARE_EPSYLON;
|
||||
return bgc_fp32_vector2_get_square_modulus(vector) <= BGC_FP32_SQUARE_EPSILON;
|
||||
}
|
||||
|
||||
inline int bgc_fp64_vector2_is_zero(const BGC_FP64_Vector2* vector)
|
||||
{
|
||||
return bgc_fp64_vector2_get_square_modulus(vector) <= BGC_FP64_SQUARE_EPSYLON;
|
||||
return bgc_fp64_vector2_get_square_modulus(vector) <= BGC_FP64_SQUARE_EPSILON;
|
||||
}
|
||||
|
||||
inline int bgc_fp32_vector2_is_unit(const BGC_FP32_Vector2* vector)
|
||||
|
|
@ -292,7 +292,7 @@ inline int bgc_fp32_vector2_normalize(BGC_FP32_Vector2* vector)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -312,7 +312,7 @@ inline int bgc_fp64_vector2_normalize(BGC_FP64_Vector2* vector)
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -333,7 +333,7 @@ inline int bgc_fp32_vector2_get_normalized(BGC_FP32_Vector2* normalized, const B
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP32_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
bgc_fp32_vector2_reset(normalized);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -351,7 +351,7 @@ inline int bgc_fp64_vector2_get_normalized(BGC_FP64_Vector2* normalized, const B
|
|||
return 1;
|
||||
}
|
||||
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSYLON || isnan(square_modulus)) {
|
||||
if (square_modulus <= BGC_FP64_SQUARE_EPSILON || isnan(square_modulus)) {
|
||||
bgc_fp64_vector2_reset(normalized);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -440,11 +440,11 @@ inline int bgc_fp32_vector2_are_close(const BGC_FP32_Vector2* vector1, const BGC
|
|||
const float square_modulus2 = bgc_fp32_vector2_get_square_modulus(vector2);
|
||||
const float square_distance = bgc_fp32_vector2_get_square_distance(vector1, vector2);
|
||||
|
||||