Переход на парадигму Destination first в порядке параметров функий
This commit is contained in:
parent
f7e41645fe
commit
03627f4401
41 changed files with 1570 additions and 1978 deletions
|
|
@ -36,14 +36,14 @@ inline void bgc_fp64_vector3_reset(BGC_FP64_Vector3* vector)
|
|||
|
||||
// ==================== Set ===================== //
|
||||
|
||||
inline void bgc_fp32_vector3_make(const float x1, const float x2, const float x3, BGC_FP32_Vector3* destination)
|
||||
inline void bgc_fp32_vector3_make(BGC_FP32_Vector3* destination, const float x1, const float x2, const float x3)
|
||||
{
|
||||
destination->x1 = x1;
|
||||
destination->x2 = x2;
|
||||
destination->x3 = x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_make(const double x1, const double x2, const double x3, BGC_FP64_Vector3* destination)
|
||||
inline void bgc_fp64_vector3_make(BGC_FP64_Vector3* destination, const double x1, const double x2, const double x3)
|
||||
{
|
||||
destination->x1 = x1;
|
||||
destination->x2 = x2;
|
||||
|
|
@ -96,14 +96,14 @@ inline int bgc_fp64_vector3_is_unit(const BGC_FP64_Vector3* vector)
|
|||
|
||||
// ==================== Copy ==================== //
|
||||
|
||||
inline void bgc_fp32_vector3_copy(const BGC_FP32_Vector3* source, BGC_FP32_Vector3* destination)
|
||||
inline void bgc_fp32_vector3_copy(BGC_FP32_Vector3* destination, const BGC_FP32_Vector3* source)
|
||||
{
|
||||
destination->x1 = source->x1;
|
||||
destination->x2 = source->x2;
|
||||
destination->x3 = source->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_copy(const BGC_FP64_Vector3* source, BGC_FP64_Vector3* destination)
|
||||
inline void bgc_fp64_vector3_copy(BGC_FP64_Vector3* destination, const BGC_FP64_Vector3* source)
|
||||
{
|
||||
destination->x1 = source->x1;
|
||||
destination->x2 = source->x2;
|
||||
|
|
@ -144,30 +144,30 @@ inline void bgc_fp64_vector3_swap(BGC_FP64_Vector3* vector1, BGC_FP64_Vector3* v
|
|||
|
||||
// ================== Convert =================== //
|
||||
|
||||
inline void bgc_fp64_vector3_convert_to_fp32(const BGC_FP64_Vector3* source, BGC_FP32_Vector3* destination)
|
||||
{
|
||||
destination->x1 = (float)source->x1;
|
||||
destination->x2 = (float)source->x2;
|
||||
destination->x3 = (float)source->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp32_vector3_convert_to_fp64(const BGC_FP32_Vector3* source, BGC_FP64_Vector3* destination)
|
||||
inline void bgc_fp32_vector3_convert_to_fp64(BGC_FP64_Vector3* destination, const BGC_FP32_Vector3* source)
|
||||
{
|
||||
destination->x1 = source->x1;
|
||||
destination->x2 = source->x2;
|
||||
destination->x3 = source->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_convert_to_fp32(BGC_FP32_Vector3* destination, const BGC_FP64_Vector3* source)
|
||||
{
|
||||
destination->x1 = (float)source->x1;
|
||||
destination->x2 = (float)source->x2;
|
||||
destination->x3 = (float)source->x3;
|
||||
}
|
||||
|
||||
// ==================== Add ===================== //
|
||||
|
||||
inline void bgc_fp32_vector3_add(const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, BGC_FP32_Vector3* sum)
|
||||
inline void bgc_fp32_vector3_add(BGC_FP32_Vector3* sum, const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2)
|
||||
{
|
||||
sum->x1 = vector1->x1 + vector2->x1;
|
||||
sum->x2 = vector1->x2 + vector2->x2;
|
||||
sum->x3 = vector1->x3 + vector2->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_add(const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, BGC_FP64_Vector3* sum)
|
||||
inline void bgc_fp64_vector3_add(BGC_FP64_Vector3* sum, const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2)
|
||||
{
|
||||
sum->x1 = vector1->x1 + vector2->x1;
|
||||
sum->x2 = vector1->x2 + vector2->x2;
|
||||
|
|
@ -176,14 +176,14 @@ inline void bgc_fp64_vector3_add(const BGC_FP64_Vector3* vector1, const BGC_FP64
|
|||
|
||||
// ================= Add scaled ================= //
|
||||
|
||||
inline void bgc_fp32_vector3_add_scaled(const BGC_FP32_Vector3* basic_vector, const BGC_FP32_Vector3* scalable_vector, const float scale, BGC_FP32_Vector3* sum)
|
||||
inline void bgc_fp32_vector3_add_scaled(BGC_FP32_Vector3* sum, const BGC_FP32_Vector3* basic_vector, const BGC_FP32_Vector3* scalable_vector, const float scale)
|
||||
{
|
||||
sum->x1 = basic_vector->x1 + scalable_vector->x1 * scale;
|
||||
sum->x2 = basic_vector->x2 + scalable_vector->x2 * scale;
|
||||
sum->x3 = basic_vector->x3 + scalable_vector->x3 * scale;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_add_scaled(const BGC_FP64_Vector3* basic_vector, const BGC_FP64_Vector3* scalable_vector, const double scale, BGC_FP64_Vector3* sum)
|
||||
inline void bgc_fp64_vector3_add_scaled(BGC_FP64_Vector3* sum, const BGC_FP64_Vector3* basic_vector, const BGC_FP64_Vector3* scalable_vector, const double scale)
|
||||
{
|
||||
sum->x1 = basic_vector->x1 + scalable_vector->x1 * scale;
|
||||
sum->x2 = basic_vector->x2 + scalable_vector->x2 * scale;
|
||||
|
|
@ -192,14 +192,14 @@ inline void bgc_fp64_vector3_add_scaled(const BGC_FP64_Vector3* basic_vector, co
|
|||
|
||||
// ================== Subtract ================== //
|
||||
|
||||
inline void bgc_fp32_vector3_subtract(const BGC_FP32_Vector3* minuend, const BGC_FP32_Vector3* subtrahend, BGC_FP32_Vector3* difference)
|
||||
inline void bgc_fp32_vector3_subtract(BGC_FP32_Vector3* difference, const BGC_FP32_Vector3* minuend, const BGC_FP32_Vector3* subtrahend)
|
||||
{
|
||||
difference->x1 = minuend->x1 - subtrahend->x1;
|
||||
difference->x2 = minuend->x2 - subtrahend->x2;
|
||||
difference->x3 = minuend->x3 - subtrahend->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_subtract(const BGC_FP64_Vector3* minuend, const BGC_FP64_Vector3* subtrahend, BGC_FP64_Vector3* difference)
|
||||
inline void bgc_fp64_vector3_subtract(BGC_FP64_Vector3* difference, const BGC_FP64_Vector3* minuend, const BGC_FP64_Vector3* subtrahend)
|
||||
{
|
||||
difference->x1 = minuend->x1 - subtrahend->x1;
|
||||
difference->x2 = minuend->x2 - subtrahend->x2;
|
||||
|
|
@ -208,14 +208,14 @@ inline void bgc_fp64_vector3_subtract(const BGC_FP64_Vector3* minuend, const BGC
|
|||
|
||||
// ================== Multiply ================== //
|
||||
|
||||
inline void bgc_fp32_vector3_multiply(const BGC_FP32_Vector3* multiplicand, const float multiplier, BGC_FP32_Vector3* product)
|
||||
inline void bgc_fp32_vector3_multiply(BGC_FP32_Vector3* product, const BGC_FP32_Vector3* multiplicand, const float multiplier)
|
||||
{
|
||||
product->x1 = multiplicand->x1 * multiplier;
|
||||
product->x2 = multiplicand->x2 * multiplier;
|
||||
product->x3 = multiplicand->x3 * multiplier;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_multiply(const BGC_FP64_Vector3* multiplicand, const double multiplier, BGC_FP64_Vector3* product)
|
||||
inline void bgc_fp64_vector3_multiply(BGC_FP64_Vector3* product, const BGC_FP64_Vector3* multiplicand, const double multiplier)
|
||||
{
|
||||
product->x1 = multiplicand->x1 * multiplier;
|
||||
product->x2 = multiplicand->x2 * multiplier;
|
||||
|
|
@ -224,51 +224,51 @@ inline void bgc_fp64_vector3_multiply(const BGC_FP64_Vector3* multiplicand, cons
|
|||
|
||||
// =================== Divide =================== //
|
||||
|
||||
inline void bgc_fp32_vector3_divide(const BGC_FP32_Vector3* dividend, const float divisor, BGC_FP32_Vector3* quotient)
|
||||
inline void bgc_fp32_vector3_divide(BGC_FP32_Vector3* quotient, const BGC_FP32_Vector3* dividend, const float divisor)
|
||||
{
|
||||
bgc_fp32_vector3_multiply(dividend, 1.0f / divisor, quotient);
|
||||
bgc_fp32_vector3_multiply(quotient, dividend, 1.0f / divisor);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_divide(const BGC_FP64_Vector3* dividend, const double divisor, BGC_FP64_Vector3* quotient)
|
||||
inline void bgc_fp64_vector3_divide(BGC_FP64_Vector3* quotient, const BGC_FP64_Vector3* dividend, const double divisor)
|
||||
{
|
||||
bgc_fp64_vector3_multiply(dividend, 1.0 / divisor, quotient);
|
||||
bgc_fp64_vector3_multiply(quotient, dividend, 1.0 / divisor);
|
||||
}
|
||||
|
||||
// ================== Average2 ================== //
|
||||
|
||||
inline void bgc_fp32_vector3_get_middle2(const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, BGC_FP32_Vector3* middle)
|
||||
inline void bgc_fp32_vector3_get_mean2(BGC_FP32_Vector3* mean, const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2)
|
||||
{
|
||||
middle->x1 = (vector1->x1 + vector2->x1) * 0.5f;
|
||||
middle->x2 = (vector1->x2 + vector2->x2) * 0.5f;
|
||||
middle->x3 = (vector1->x3 + vector2->x3) * 0.5f;
|
||||
mean->x1 = (vector1->x1 + vector2->x1) * 0.5f;
|
||||
mean->x2 = (vector1->x2 + vector2->x2) * 0.5f;
|
||||
mean->x3 = (vector1->x3 + vector2->x3) * 0.5f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_get_middle2(const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, BGC_FP64_Vector3* middle)
|
||||
inline void bgc_fp64_vector3_get_mean2(BGC_FP64_Vector3* mean, const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2)
|
||||
{
|
||||
middle->x1 = (vector1->x1 + vector2->x1) * 0.5;
|
||||
middle->x2 = (vector1->x2 + vector2->x2) * 0.5;
|
||||
middle->x3 = (vector1->x3 + vector2->x3) * 0.5;
|
||||
mean->x1 = (vector1->x1 + vector2->x1) * 0.5;
|
||||
mean->x2 = (vector1->x2 + vector2->x2) * 0.5;
|
||||
mean->x3 = (vector1->x3 + vector2->x3) * 0.5;
|
||||
}
|
||||
|
||||
// ================== Average3 ================== //
|
||||
|
||||
inline void bgc_fp32_vector3_get_middle3(const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, const BGC_FP32_Vector3* vector3, BGC_FP32_Vector3* middle)
|
||||
inline void bgc_fp32_vector3_get_mean3(BGC_FP32_Vector3* mean, const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, const BGC_FP32_Vector3* vector3)
|
||||
{
|
||||
middle->x1 = (vector1->x1 + vector2->x1 + vector3->x1) * BGC_FP32_ONE_THIRD;
|
||||
middle->x2 = (vector1->x2 + vector2->x2 + vector3->x2) * BGC_FP32_ONE_THIRD;
|
||||
middle->x3 = (vector1->x3 + vector2->x3 + vector3->x3) * BGC_FP32_ONE_THIRD;
|
||||
mean->x1 = (vector1->x1 + vector2->x1 + vector3->x1) * BGC_FP32_ONE_THIRD;
|
||||
mean->x2 = (vector1->x2 + vector2->x2 + vector3->x2) * BGC_FP32_ONE_THIRD;
|
||||
mean->x3 = (vector1->x3 + vector2->x3 + vector3->x3) * BGC_FP32_ONE_THIRD;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_get_middle3(const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, const BGC_FP64_Vector3* vector3, BGC_FP64_Vector3* middle)
|
||||
inline void bgc_fp64_vector3_get_mean3(BGC_FP64_Vector3* mean, const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, const BGC_FP64_Vector3* vector3)
|
||||
{
|
||||
middle->x1 = (vector1->x1 + vector2->x1 + vector3->x1) * BGC_FP64_ONE_THIRD;
|
||||
middle->x2 = (vector1->x2 + vector2->x2 + vector3->x2) * BGC_FP64_ONE_THIRD;
|
||||
middle->x3 = (vector1->x3 + vector2->x3 + vector3->x3) * BGC_FP64_ONE_THIRD;
|
||||
mean->x1 = (vector1->x1 + vector2->x1 + vector3->x1) * BGC_FP64_ONE_THIRD;
|
||||
mean->x2 = (vector1->x2 + vector2->x2 + vector3->x2) * BGC_FP64_ONE_THIRD;
|
||||
mean->x3 = (vector1->x3 + vector2->x3 + vector3->x3) * BGC_FP64_ONE_THIRD;
|
||||
}
|
||||
|
||||
// =================== Linear =================== //
|
||||
|
||||
inline void bgc_fp32_vector3_interpolate(const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, const float phase, BGC_FP32_Vector3* interpolation)
|
||||
inline void bgc_fp32_vector3_interpolate(BGC_FP32_Vector3* interpolation, const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, const float phase)
|
||||
{
|
||||
const float counter_phase = 1.0f - phase;
|
||||
|
||||
|
|
@ -277,7 +277,7 @@ inline void bgc_fp32_vector3_interpolate(const BGC_FP32_Vector3* vector1, const
|
|||
interpolation->x3 = vector1->x3 * counter_phase + vector2->x3 * phase;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_interpolate(const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, const double phase, BGC_FP64_Vector3* interpolation)
|
||||
inline void bgc_fp64_vector3_interpolate(BGC_FP64_Vector3* interpolation, const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, const double phase)
|
||||
{
|
||||
const double counter_phase = 1.0 - phase;
|
||||
|
||||
|
|
@ -302,14 +302,14 @@ inline void bgc_fp64_vector3_revert(BGC_FP64_Vector3* vector)
|
|||
vector->x3 = -vector->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp32_vector3_get_reverse(const BGC_FP32_Vector3* vector, BGC_FP32_Vector3* reverse)
|
||||
inline void bgc_fp32_vector3_get_reverse(BGC_FP32_Vector3* reverse, const BGC_FP32_Vector3* vector)
|
||||
{
|
||||
reverse->x1 = -vector->x1;
|
||||
reverse->x2 = -vector->x2;
|
||||
reverse->x3 = -vector->x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_get_reverse(const BGC_FP64_Vector3* vector, BGC_FP64_Vector3* reverse)
|
||||
inline void bgc_fp64_vector3_get_reverse(BGC_FP64_Vector3* reverse, const BGC_FP64_Vector3* vector)
|
||||
{
|
||||
reverse->x1 = -vector->x1;
|
||||
reverse->x2 = -vector->x2;
|
||||
|
|
@ -360,12 +360,12 @@ inline int bgc_fp64_vector3_normalize(BGC_FP64_Vector3* vector)
|
|||
return 1;
|
||||
}
|
||||
|
||||
inline int bgc_fp32_vector3_get_normalized(const BGC_FP32_Vector3* vector, BGC_FP32_Vector3* normalized)
|
||||
inline int bgc_fp32_vector3_get_normalized(BGC_FP32_Vector3* normalized, const BGC_FP32_Vector3* vector)
|
||||
{
|
||||
const float square_modulus = bgc_fp32_vector3_get_square_modulus(vector);
|
||||
|
||||
if (bgc_fp32_is_square_unit(square_modulus)) {
|
||||
bgc_fp32_vector3_copy(vector, normalized);
|
||||
bgc_fp32_vector3_copy(normalized, vector);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -374,16 +374,16 @@ inline int bgc_fp32_vector3_get_normalized(const BGC_FP32_Vector3* vector, BGC_F
|
|||
return 0;
|
||||
}
|
||||
|
||||
bgc_fp32_vector3_multiply(vector, sqrtf(1.0f / square_modulus), normalized);
|
||||
bgc_fp32_vector3_multiply(normalized, vector, sqrtf(1.0f / square_modulus));
|
||||
return 1;
|
||||
}
|
||||
|
||||
inline int bgc_fp64_vector3_get_normalized(const BGC_FP64_Vector3* vector, BGC_FP64_Vector3* normalized)
|
||||
inline int bgc_fp64_vector3_get_normalized(BGC_FP64_Vector3* normalized, const BGC_FP64_Vector3* vector)
|
||||
{
|
||||
const double square_modulus = bgc_fp64_vector3_get_square_modulus(vector);
|
||||
|
||||
if (bgc_fp64_is_square_unit(square_modulus)) {
|
||||
bgc_fp64_vector3_copy(vector, normalized);
|
||||
bgc_fp64_vector3_copy(normalized, vector);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -392,7 +392,7 @@ inline int bgc_fp64_vector3_get_normalized(const BGC_FP64_Vector3* vector, BGC_F
|
|||
return 0;
|
||||
}
|
||||
|
||||
bgc_fp64_vector3_multiply(vector, sqrt(1.0 / square_modulus), normalized);
|
||||
bgc_fp64_vector3_multiply(normalized, vector, sqrt(1.0 / square_modulus));
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
@ -426,7 +426,7 @@ inline double bgc_fp64_vector3_get_triple_product(const BGC_FP64_Vector3* vector
|
|||
|
||||
// =============== Cross Product ================ //
|
||||
|
||||
inline void bgc_fp32_vector3_get_cross_product(const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, BGC_FP32_Vector3* product)
|
||||
inline void bgc_fp32_vector3_get_cross_product(BGC_FP32_Vector3* product, const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2)
|
||||
{
|
||||
const float x1 = vector1->x2 * vector2->x3 - vector1->x3 * vector2->x2;
|
||||
const float x2 = vector1->x3 * vector2->x1 - vector1->x1 * vector2->x3;
|
||||
|
|
@ -437,7 +437,7 @@ inline void bgc_fp32_vector3_get_cross_product(const BGC_FP32_Vector3* vector1,
|
|||
product->x3 = x3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_get_cross_product(const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, BGC_FP64_Vector3* product)
|
||||
inline void bgc_fp64_vector3_get_cross_product(BGC_FP64_Vector3* product, const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2)
|
||||
{
|
||||
const double x1 = vector1->x2 * vector2->x3 - vector1->x3 * vector2->x2;
|
||||
const double x2 = vector1->x3 * vector2->x1 - vector1->x1 * vector2->x3;
|
||||
|
|
@ -450,7 +450,7 @@ inline void bgc_fp64_vector3_get_cross_product(const BGC_FP64_Vector3* vector1,
|
|||
|
||||
// ============ Double Cross Product ============ //
|
||||
|
||||
inline void bgc_fp32_vector3_get_double_cross(const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, const BGC_FP32_Vector3* vector3, BGC_FP32_Vector3* product)
|
||||
inline void bgc_fp32_vector3_get_double_cross(BGC_FP32_Vector3* product, const BGC_FP32_Vector3* vector1, const BGC_FP32_Vector3* vector2, const BGC_FP32_Vector3* vector3)
|
||||
{
|
||||
const float ac = bgc_fp32_vector3_get_dot_product(vector1, vector3);
|
||||
const float ab = bgc_fp32_vector3_get_dot_product(vector1, vector2);
|
||||
|
|
@ -460,7 +460,7 @@ inline void bgc_fp32_vector3_get_double_cross(const BGC_FP32_Vector3* vector1, c
|
|||
product->x3 = vector2->x3 * ac - vector3->x3 * ab;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_vector3_get_double_cross(const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, const BGC_FP64_Vector3* vector3, BGC_FP64_Vector3* product)
|
||||
inline void bgc_fp64_vector3_get_double_cross(BGC_FP64_Vector3* product, const BGC_FP64_Vector3* vector1, const BGC_FP64_Vector3* vector2, const BGC_FP64_Vector3* vector3)
|
||||
{
|
||||
const double ac = bgc_fp64_vector3_get_dot_product(vector1, vector3);
|
||||
const double ab = bgc_fp64_vector3_get_dot_product(vector1, vector2);
|
||||
|
|
@ -561,7 +561,7 @@ inline int bgc_fp32_vector3_are_parallel(const BGC_FP32_Vector3* vector1, const
|
|||
|
||||
BGC_FP32_Vector3 product;
|
||||
|
||||
bgc_fp32_vector3_get_cross_product(vector1, vector2, &product);
|
||||
bgc_fp32_vector3_get_cross_product(&product, vector1, vector2);
|
||||
|
||||
return bgc_fp32_vector3_get_square_modulus(&product) <= BGC_FP32_SQUARE_EPSYLON * square_modulus1 * square_modulus2;
|
||||
}
|
||||
|
|
@ -577,7 +577,7 @@ inline int bgc_fp64_vector3_are_parallel(const BGC_FP64_Vector3* vector1, const
|
|||
|
||||
BGC_FP64_Vector3 product;
|
||||
|
||||
bgc_fp64_vector3_get_cross_product(vector1, vector2, &product);
|
||||
bgc_fp64_vector3_get_cross_product(&product, vector1, vector2);
|
||||
|
||||
return bgc_fp64_vector3_get_square_modulus(&product) <= BGC_FP64_SQUARE_EPSYLON * square_modulus1 * square_modulus2;
|
||||
}
|
||||
|
|
@ -633,7 +633,7 @@ inline int bgc_fp32_vector3_get_attitude(const BGC_FP32_Vector3* vector1, const
|
|||
|
||||
BGC_FP32_Vector3 product;
|
||||
|
||||
bgc_fp32_vector3_get_cross_product(vector1, vector2, &product);
|
||||
bgc_fp32_vector3_get_cross_product(&product, vector1, vector2);
|
||||
|
||||
if (bgc_fp32_vector3_get_square_modulus(&product) > square_limit) {
|
||||
return BGC_ATTITUDE_ANY;
|
||||
|
|
@ -661,7 +661,7 @@ inline int bgc_fp64_vector3_get_attitude(const BGC_FP64_Vector3* vector1, const
|
|||
|
||||
BGC_FP64_Vector3 product;
|
||||
|
||||
bgc_fp64_vector3_get_cross_product(vector1, vector2, &product);
|
||||
bgc_fp64_vector3_get_cross_product(&product, vector1, vector2);
|
||||
|
||||
if (bgc_fp64_vector3_get_square_modulus(&product) > square_limit) {
|
||||
return BGC_ATTITUDE_ANY;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue