Переименование типов на на общепринятый формат, отказ от суффикса _t, так как он зарезервирован POSIX

This commit is contained in:
Andrey Pokidov 2025-01-15 23:56:17 +07:00
parent 3805354611
commit 0027924f86
26 changed files with 574 additions and 571 deletions

View file

@ -6,7 +6,7 @@
// =================== Reset ==================== //
inline void bgc_matrix3x3_reset_fp32(bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_reset_fp32(BgcMatrix3x3FP32* matrix)
{
matrix->r1c1 = 0.0f;
matrix->r1c2 = 0.0f;
@ -21,7 +21,7 @@ inline void bgc_matrix3x3_reset_fp32(bgc_matrix3x3_fp32_t* matrix)
matrix->r3c3 = 0.0f;
}
inline void bgc_matrix3x3_reset_fp64(bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_reset_fp64(BgcMatrix3x3FP64* matrix)
{
matrix->r1c1 = 0.0;
matrix->r1c2 = 0.0;
@ -38,7 +38,7 @@ inline void bgc_matrix3x3_reset_fp64(bgc_matrix3x3_fp64_t* matrix)
// ================== Identity ================== //
inline void bgc_matrix3x3_set_to_identity_fp32(bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_to_identity_fp32(BgcMatrix3x3FP32* matrix)
{
matrix->r1c1 = 1.0f;
matrix->r1c2 = 0.0f;
@ -53,7 +53,7 @@ inline void bgc_matrix3x3_set_to_identity_fp32(bgc_matrix3x3_fp32_t* matrix)
matrix->r3c3 = 1.0f;
}
inline void bgc_matrix3x3_set_to_identity_fp64(bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_to_identity_fp64(BgcMatrix3x3FP64* matrix)
{
matrix->r1c1 = 1.0;
matrix->r1c2 = 0.0;
@ -70,7 +70,7 @@ inline void bgc_matrix3x3_set_to_identity_fp64(bgc_matrix3x3_fp64_t* matrix)
// ================ Make Diagonal =============== //
inline void bgc_matrix3x3_set_to_diagonal_fp32(const float d1, const float d2, const float d3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_to_diagonal_fp32(const float d1, const float d2, const float d3, BgcMatrix3x3FP32* matrix)
{
matrix->r1c1 = d1;
matrix->r1c2 = 0.0f;
@ -85,7 +85,7 @@ inline void bgc_matrix3x3_set_to_diagonal_fp32(const float d1, const float d2, c
matrix->r3c3 = d2;
}
inline void bgc_matrix3x3_set_to_diagonal_fp64(const double d1, const double d2, const double d3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_to_diagonal_fp64(const double d1, const double d2, const double d3, BgcMatrix3x3FP64* matrix)
{
matrix->r1c1 = d1;
matrix->r1c2 = 0.0;
@ -102,7 +102,7 @@ inline void bgc_matrix3x3_set_to_diagonal_fp64(const double d1, const double d2,
// ==================== Copy ==================== //
inline void bgc_matrix3x3_copy_fp32(const bgc_matrix3x3_fp32_t* from, bgc_matrix3x3_fp32_t* to)
inline void bgc_matrix3x3_copy_fp32(const BgcMatrix3x3FP32* from, BgcMatrix3x3FP32* to)
{
to->r1c1 = from->r1c1;
to->r1c2 = from->r1c2;
@ -117,7 +117,7 @@ inline void bgc_matrix3x3_copy_fp32(const bgc_matrix3x3_fp32_t* from, bgc_matrix
to->r3c3 = from->r3c3;
}
inline void bgc_matrix3x3_copy_fp64(const bgc_matrix3x3_fp64_t* from, bgc_matrix3x3_fp64_t* to)
inline void bgc_matrix3x3_copy_fp64(const BgcMatrix3x3FP64* from, BgcMatrix3x3FP64* to)
{
to->r1c1 = from->r1c1;
to->r1c2 = from->r1c2;
@ -134,7 +134,7 @@ inline void bgc_matrix3x3_copy_fp64(const bgc_matrix3x3_fp64_t* from, bgc_matrix
// ==================== Swap ==================== //
inline void bgc_matrix3x3_swap_fp32(bgc_matrix3x3_fp32_t* matrix1, bgc_matrix3x3_fp32_t* matrix2)
inline void bgc_matrix3x3_swap_fp32(BgcMatrix3x3FP32* matrix1, BgcMatrix3x3FP32* matrix2)
{
const float r1c1 = matrix2->r1c1;
const float r1c2 = matrix2->r1c2;
@ -173,7 +173,7 @@ inline void bgc_matrix3x3_swap_fp32(bgc_matrix3x3_fp32_t* matrix1, bgc_matrix3x3
matrix1->r3c3 = r3c3;
}
inline void bgc_matrix3x3_swap_fp64(bgc_matrix3x3_fp64_t* matrix1, bgc_matrix3x3_fp64_t* matrix2)
inline void bgc_matrix3x3_swap_fp64(BgcMatrix3x3FP64* matrix1, BgcMatrix3x3FP64* matrix2)
{
const double r1c1 = matrix2->r1c1;
const double r1c2 = matrix2->r1c2;
@ -214,7 +214,7 @@ inline void bgc_matrix3x3_swap_fp64(bgc_matrix3x3_fp64_t* matrix1, bgc_matrix3x3
// ============= Set from twin type ============= //
inline void bgc_matrix3x3_convert_fp64_to_fp32(const bgc_matrix3x3_fp64_t* from, bgc_matrix3x3_fp32_t* to)
inline void bgc_matrix3x3_convert_fp64_to_fp32(const BgcMatrix3x3FP64* from, BgcMatrix3x3FP32* to)
{
to->r1c1 = (float) from->r1c1;
to->r1c2 = (float) from->r1c2;
@ -229,7 +229,7 @@ inline void bgc_matrix3x3_convert_fp64_to_fp32(const bgc_matrix3x3_fp64_t* from,
to->r3c3 = (float) from->r3c3;
}
inline void bgc_matrix3x3_convert_fp32_to_fp64(const bgc_matrix3x3_fp32_t* from, bgc_matrix3x3_fp64_t* to)
inline void bgc_matrix3x3_convert_fp32_to_fp64(const BgcMatrix3x3FP32* from, BgcMatrix3x3FP64* to)
{
to->r1c1 = from->r1c1;
to->r1c2 = from->r1c2;
@ -246,14 +246,14 @@ inline void bgc_matrix3x3_convert_fp32_to_fp64(const bgc_matrix3x3_fp32_t* from,
// ================ Determinant ================= //
inline float bgc_matrix3x3_get_determinant_fp32(const bgc_matrix3x3_fp32_t* matrix)
inline float bgc_matrix3x3_get_determinant_fp32(const BgcMatrix3x3FP32* matrix)
{
return matrix->r1c1 * (matrix->r2c2 * matrix->r3c3 - matrix->r2c3 * matrix->r3c2)
+ matrix->r1c2 * (matrix->r2c3 * matrix->r3c1 - matrix->r2c1 * matrix->r3c3)
+ matrix->r1c3 * (matrix->r2c1 * matrix->r3c2 - matrix->r2c2 * matrix->r3c1);
}
inline double bgc_matrix3x3_get_determinant_fp64(const bgc_matrix3x3_fp64_t* matrix)
inline double bgc_matrix3x3_get_determinant_fp64(const BgcMatrix3x3FP64* matrix)
{
return matrix->r1c1 * (matrix->r2c2 * matrix->r3c3 - matrix->r2c3 * matrix->r3c2)
+ matrix->r1c2 * (matrix->r2c3 * matrix->r3c1 - matrix->r2c1 * matrix->r3c3)
@ -262,14 +262,14 @@ inline double bgc_matrix3x3_get_determinant_fp64(const bgc_matrix3x3_fp64_t* mat
// ================== Singular ================== //
inline int bgc_matrix3x3_is_singular_fp32(const bgc_matrix3x3_fp32_t* 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;
}
inline int bgc_matrix3x3_is_singular_fp64(const bgc_matrix3x3_fp64_t* matrix)
inline int bgc_matrix3x3_is_singular_fp64(const BgcMatrix3x3FP64* matrix)
{
const double determinant = bgc_matrix3x3_get_determinant_fp64(matrix);
@ -278,13 +278,13 @@ inline int bgc_matrix3x3_is_singular_fp64(const bgc_matrix3x3_fp64_t* matrix)
// ================= Inversion ================== //
int bgc_matrix3x3_invert_fp32(bgc_matrix3x3_fp32_t* matrix);
int bgc_matrix3x3_invert_fp32(BgcMatrix3x3FP32* matrix);
int bgc_matrix3x3_invert_fp64(bgc_matrix3x3_fp64_t* matrix);
int bgc_matrix3x3_invert_fp64(BgcMatrix3x3FP64* matrix);
// =============== Transposition ================ //
inline void bgc_matrix3x3_transpose_fp32(bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_transpose_fp32(BgcMatrix3x3FP32* matrix)
{
float tmp = matrix->r1c2;
matrix->r1c2 = matrix->r2c1;
@ -299,7 +299,7 @@ inline void bgc_matrix3x3_transpose_fp32(bgc_matrix3x3_fp32_t* matrix)
matrix->r3c2 = tmp;
}
inline void bgc_matrix3x3_transpose_fp64(bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_transpose_fp64(BgcMatrix3x3FP64* matrix)
{
double tmp = matrix->r1c2;
matrix->r1c2 = matrix->r2c1;
@ -316,13 +316,13 @@ inline void bgc_matrix3x3_transpose_fp64(bgc_matrix3x3_fp64_t* matrix)
// ================ Make Inverted =============== //
int bgc_matrix3x3_set_inverted_fp32(const bgc_matrix3x3_fp32_t* matrix, bgc_matrix3x3_fp32_t* result);
int bgc_matrix3x3_set_inverted_fp32(const BgcMatrix3x3FP32* matrix, BgcMatrix3x3FP32* result);
int bgc_matrix3x3_set_inverted_fp64(const bgc_matrix3x3_fp64_t* matrix, bgc_matrix3x3_fp64_t* result);
int bgc_matrix3x3_set_inverted_fp64(const BgcMatrix3x3FP64* matrix, BgcMatrix3x3FP64* result);
// =============== Make Transposed ============== //
inline void bgc_matrix3x3_set_transposed_fp32(const bgc_matrix3x3_fp32_t* matrix, bgc_matrix3x3_fp32_t* result)
inline void bgc_matrix3x3_set_transposed_fp32(const BgcMatrix3x3FP32* matrix, BgcMatrix3x3FP32* result)
{
if (matrix == result) {
bgc_matrix3x3_transpose_fp32(result);
@ -342,7 +342,7 @@ inline void bgc_matrix3x3_set_transposed_fp32(const bgc_matrix3x3_fp32_t* matrix
result->r3c3 = matrix->r3c3;
}
inline void bgc_matrix3x3_set_transposed_fp64(const bgc_matrix3x3_fp64_t* matrix, bgc_matrix3x3_fp64_t* result)
inline void bgc_matrix3x3_set_transposed_fp64(const BgcMatrix3x3FP64* matrix, BgcMatrix3x3FP64* result)
{
if (matrix == result) {
bgc_matrix3x3_transpose_fp64(result);
@ -364,14 +364,14 @@ inline void bgc_matrix3x3_set_transposed_fp64(const bgc_matrix3x3_fp64_t* matrix
// ================= Set Row 1 ================== //
inline void bgc_matrix3x3_set_row1_fp32(const float c1, const float c2, const float c3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_row1_fp32(const float c1, const float c2, const float c3, BgcMatrix3x3FP32* matrix)
{
matrix->r1c1 = c1;
matrix->r1c2 = c2;
matrix->r1c3 = c3;
}
inline void bgc_matrix3x3_set_row1_fp64(const double c1, const double c2, const double c3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_row1_fp64(const double c1, const double c2, const double c3, BgcMatrix3x3FP64* matrix)
{
matrix->r1c1 = c1;
matrix->r1c2 = c2;
@ -380,14 +380,14 @@ inline void bgc_matrix3x3_set_row1_fp64(const double c1, const double c2, const
// ================= Set Row 2 ================== //
inline void bgc_matrix3x3_set_row2_fp32(const float c1, const float c2, const float c3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_row2_fp32(const float c1, const float c2, const float c3, BgcMatrix3x3FP32* matrix)
{
matrix->r2c1 = c1;
matrix->r2c2 = c2;
matrix->r2c3 = c3;
}
inline void bgc_matrix3x3_set_row2_fp64(const double c1, const double c2, const double c3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_row2_fp64(const double c1, const double c2, const double c3, BgcMatrix3x3FP64* matrix)
{
matrix->r2c1 = c1;
matrix->r2c2 = c2;
@ -396,14 +396,14 @@ inline void bgc_matrix3x3_set_row2_fp64(const double c1, const double c2, const
// ================= Set Row 3 ================== //
inline void bgc_matrix3x3_set_row3_fp32(const float c1, const float c2, const float c3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_row3_fp32(const float c1, const float c2, const float c3, BgcMatrix3x3FP32* matrix)
{
matrix->r3c1 = c1;
matrix->r3c2 = c2;
matrix->r3c3 = c3;
}
inline void bgc_matrix3x3_set_row3_fp64(const double c1, const double c2, const double c3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_row3_fp64(const double c1, const double c2, const double c3, BgcMatrix3x3FP64* matrix)
{
matrix->r3c1 = c1;
matrix->r3c2 = c2;
@ -412,14 +412,14 @@ inline void bgc_matrix3x3_set_row3_fp64(const double c1, const double c2, const
// ================ Set Column 1 ================ //
inline void bgc_matrix3x3_set_column1_fp32(const float r1, const float r2, const float r3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_column1_fp32(const float r1, const float r2, const float r3, BgcMatrix3x3FP32* matrix)
{
matrix->r1c1 = r1;
matrix->r2c1 = r2;
matrix->r3c1 = r3;
}
inline void bgc_matrix3x3_set_column1_fp64(const double r1, const double r2, const double r3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_column1_fp64(const double r1, const double r2, const double r3, BgcMatrix3x3FP64* matrix)
{
matrix->r1c1 = r1;
matrix->r2c1 = r2;
@ -428,14 +428,14 @@ inline void bgc_matrix3x3_set_column1_fp64(const double r1, const double r2, con
// ================ Set Column 2 ================ //
inline void bgc_matrix3x3_set_column2_fp32(const float r1, const float r2, const float r3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_column2_fp32(const float r1, const float r2, const float r3, BgcMatrix3x3FP32* matrix)
{
matrix->r1c2 = r1;
matrix->r2c2 = r2;
matrix->r3c2 = r3;
}
inline void bgc_matrix3x3_set_column2_fp64(const double r1, const double r2, const double r3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_column2_fp64(const double r1, const double r2, const double r3, BgcMatrix3x3FP64* matrix)
{
matrix->r1c2 = r1;
matrix->r2c2 = r2;
@ -444,14 +444,14 @@ inline void bgc_matrix3x3_set_column2_fp64(const double r1, const double r2, con
// ================ Set Column 3 ================ //
inline void bgc_matrix3x3_set_column3_fp32(const float r1, const float r2, const float r3, bgc_matrix3x3_fp32_t* matrix)
inline void bgc_matrix3x3_set_column3_fp32(const float r1, const float r2, const float r3, BgcMatrix3x3FP32* matrix)
{
matrix->r1c3 = r1;
matrix->r2c3 = r2;
matrix->r3c3 = r3;
}
inline void bgc_matrix3x3_set_column3_fp64(const double r1, const double r2, const double r3, bgc_matrix3x3_fp64_t* matrix)
inline void bgc_matrix3x3_set_column3_fp64(const double r1, const double r2, const double r3, BgcMatrix3x3FP64* matrix)
{
matrix->r1c3 = r1;
matrix->r2c3 = r2;
@ -460,7 +460,7 @@ inline void bgc_matrix3x3_set_column3_fp64(const double r1, const double r2, con
// ================== Addition ================== //
inline void bgc_matrix3x3_add_fp32(const bgc_matrix3x3_fp32_t* matrix1, const bgc_matrix3x3_fp32_t* matrix2, bgc_matrix3x3_fp32_t* sum)
inline void bgc_matrix3x3_add_fp32(const BgcMatrix3x3FP32* matrix1, const BgcMatrix3x3FP32* matrix2, BgcMatrix3x3FP32* sum)
{
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
@ -475,7 +475,7 @@ inline void bgc_matrix3x3_add_fp32(const bgc_matrix3x3_fp32_t* matrix1, const bg
sum->r3c3 = matrix1->r3c3 + matrix2->r3c3;
}
inline void bgc_matrix3x3_add_fp64(const bgc_matrix3x3_fp64_t* matrix1, const bgc_matrix3x3_fp64_t* matrix2, bgc_matrix3x3_fp64_t* sum)
inline void bgc_matrix3x3_add_fp64(const BgcMatrix3x3FP64* matrix1, const BgcMatrix3x3FP64* matrix2, BgcMatrix3x3FP64* sum)
{
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
@ -492,7 +492,7 @@ inline void bgc_matrix3x3_add_fp64(const bgc_matrix3x3_fp64_t* matrix1, const bg
// ================= Add scaled ================= //
inline void bgc_matrix3x3_add_scaled_fp32(const bgc_matrix3x3_fp32_t* basic_matrix, const bgc_matrix3x3_fp32_t* scalable_matrix, const float scale, bgc_matrix3x3_fp32_t* sum)
inline void bgc_matrix3x3_add_scaled_fp32(const BgcMatrix3x3FP32* basic_matrix, const BgcMatrix3x3FP32* scalable_matrix, const float scale, BgcMatrix3x3FP32* sum)
{
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
@ -507,7 +507,7 @@ inline void bgc_matrix3x3_add_scaled_fp32(const bgc_matrix3x3_fp32_t* basic_matr
sum->r3c3 = basic_matrix->r3c3 + scalable_matrix->r3c3 * scale;
}
inline void bgc_matrix3x3_add_scaled_fp64(const bgc_matrix3x3_fp64_t* basic_matrix, const bgc_matrix3x3_fp64_t* scalable_matrix, const double scale, bgc_matrix3x3_fp64_t* sum)
inline void bgc_matrix3x3_add_scaled_fp64(const BgcMatrix3x3FP64* basic_matrix, const BgcMatrix3x3FP64* scalable_matrix, const double scale, BgcMatrix3x3FP64* sum)
{
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
@ -524,7 +524,7 @@ inline void bgc_matrix3x3_add_scaled_fp64(const bgc_matrix3x3_fp64_t* basic_matr
// ================ Subtraction ================= //
inline void bgc_matrix3x3_subtract_fp32(const bgc_matrix3x3_fp32_t* minuend, const bgc_matrix3x3_fp32_t* subtrahend, bgc_matrix3x3_fp32_t* difference)
inline void bgc_matrix3x3_subtract_fp32(const BgcMatrix3x3FP32* minuend, const BgcMatrix3x3FP32* subtrahend, BgcMatrix3x3FP32* difference)
{
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
@ -539,7 +539,7 @@ inline void bgc_matrix3x3_subtract_fp32(const bgc_matrix3x3_fp32_t* minuend, con
difference->r3c3 = minuend->r3c3 - subtrahend->r3c3;
}
inline void bgc_matrix3x3_subtract_fp64(const bgc_matrix3x3_fp64_t* minuend, const bgc_matrix3x3_fp64_t* subtrahend, bgc_matrix3x3_fp64_t* difference)
inline void bgc_matrix3x3_subtract_fp64(const BgcMatrix3x3FP64* minuend, const BgcMatrix3x3FP64* subtrahend, BgcMatrix3x3FP64* difference)
{
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
@ -556,7 +556,7 @@ inline void bgc_matrix3x3_subtract_fp64(const bgc_matrix3x3_fp64_t* minuend, con
// =============== Multiplication =============== //
inline void bgc_matrix3x3_multiply_fp32(const bgc_matrix3x3_fp32_t* multiplicand, const float multiplier, bgc_matrix3x3_fp32_t* product)
inline void bgc_matrix3x3_multiply_fp32(const BgcMatrix3x3FP32* multiplicand, const float multiplier, BgcMatrix3x3FP32* product)
{
product->r1c1 = multiplicand->r1c1 * multiplier;
product->r1c2 = multiplicand->r1c2 * multiplier;
@ -571,7 +571,7 @@ inline void bgc_matrix3x3_multiply_fp32(const bgc_matrix3x3_fp32_t* multiplicand
product->r3c3 = multiplicand->r3c3 * multiplier;
}
inline void bgc_matrix3x3_multiply_fp64(const bgc_matrix3x3_fp64_t* multiplicand, const double multiplier, bgc_matrix3x3_fp64_t* product)
inline void bgc_matrix3x3_multiply_fp64(const BgcMatrix3x3FP64* multiplicand, const double multiplier, BgcMatrix3x3FP64* product)
{
product->r1c1 = multiplicand->r1c1 * multiplier;
product->r1c2 = multiplicand->r1c2 * multiplier;
@ -588,19 +588,19 @@ inline void bgc_matrix3x3_multiply_fp64(const bgc_matrix3x3_fp64_t* multiplicand
// ================== Division ================== //
inline void bgc_matrix3x3_divide_fp32(const bgc_matrix3x3_fp32_t* dividend, const float divisor, bgc_matrix3x3_fp32_t* quotient)
inline void bgc_matrix3x3_divide_fp32(const BgcMatrix3x3FP32* dividend, const float divisor, BgcMatrix3x3FP32* quotient)
{
bgc_matrix3x3_multiply_fp32(dividend, 1.0f / divisor, quotient);
}
inline void bgc_matrix3x3_divide_fp64(const bgc_matrix3x3_fp64_t* dividend, const double divisor, bgc_matrix3x3_fp64_t* quotient)
inline void bgc_matrix3x3_divide_fp64(const BgcMatrix3x3FP64* dividend, const double divisor, BgcMatrix3x3FP64* quotient)
{
bgc_matrix3x3_multiply_fp64(dividend, 1.0 / divisor, quotient);
}
// ============ Left Vector Product ============= //
inline void bgc_matrix3x3_left_product_fp32(const bgc_vector3_fp32_t* vector, const bgc_matrix3x3_fp32_t* matrix, bgc_vector3_fp32_t* result)
inline void bgc_matrix3x3_left_product_fp32(const BgcVector3FP32* vector, const BgcMatrix3x3FP32* matrix, BgcVector3FP32* result)
{
const float x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1 + vector->x3 * matrix->r3c1;
const float x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2 + vector->x3 * matrix->r3c2;
@ -611,7 +611,7 @@ inline void bgc_matrix3x3_left_product_fp32(const bgc_vector3_fp32_t* vector, co
result->x3 = x3;
}
inline void bgc_matrix3x3_left_product_fp64(const bgc_vector3_fp64_t* vector, const bgc_matrix3x3_fp64_t* matrix, bgc_vector3_fp64_t* result)
inline void bgc_matrix3x3_left_product_fp64(const BgcVector3FP64* vector, const BgcMatrix3x3FP64* matrix, BgcVector3FP64* result)
{
const double x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1 + vector->x3 * matrix->r3c1;
const double x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2 + vector->x3 * matrix->r3c2;
@ -624,7 +624,7 @@ inline void bgc_matrix3x3_left_product_fp64(const bgc_vector3_fp64_t* vector, co
// ============ Right Vector Product ============ //
inline void bgc_matrix3x3_right_product_fp32(const bgc_matrix3x3_fp32_t* matrix, const bgc_vector3_fp32_t* vector, bgc_vector3_fp32_t* result)
inline void bgc_matrix3x3_right_product_fp32(const BgcMatrix3x3FP32* matrix, const BgcVector3FP32* vector, BgcVector3FP32* result)
{
const float x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2 + matrix->r1c3 * vector->x3;
const float x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2 + matrix->r2c3 * vector->x3;
@ -635,7 +635,7 @@ inline void bgc_matrix3x3_right_product_fp32(const bgc_matrix3x3_fp32_t* matrix,
result->x3 = x3;
}
inline void bgc_matrix3x3_right_product_fp64(const bgc_matrix3x3_fp64_t* matrix, const bgc_vector3_fp64_t* vector, bgc_vector3_fp64_t* result)
inline void bgc_matrix3x3_right_product_fp64(const BgcMatrix3x3FP64* matrix, const BgcVector3FP64* vector, BgcVector3FP64* result)
{
const double x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2 + matrix->r1c3 * vector->x3;
const double x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2 + matrix->r2c3 * vector->x3;