Завершение большого переименования
This commit is contained in:
parent
120e651517
commit
3805354611
31 changed files with 1213 additions and 1255 deletions
|
@ -1,5 +1,5 @@
|
|||
#ifndef _BASIC_GEOMETRY_MATRIX3X2_H_
|
||||
#define _BASIC_GEOMETRY_MATRIX3X2_H_
|
||||
#ifndef _BGC_MATRIX3X2_H_
|
||||
#define _BGC_MATRIX3X2_H_
|
||||
|
||||
#include "vector2.h"
|
||||
#include "vector3.h"
|
||||
|
@ -7,7 +7,7 @@
|
|||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void matrix3x2_reset_fp32(matrix3x2_fp32_t* matrix)
|
||||
inline void bgc_matrix3x2_reset_fp32(bgc_matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 0.0f;
|
||||
matrix->r1c2 = 0.0f;
|
||||
|
@ -18,7 +18,7 @@ inline void matrix3x2_reset_fp32(matrix3x2_fp32_t* matrix)
|
|||
matrix->r2c3 = 0.0f;
|
||||
}
|
||||
|
||||
inline void matrix3x2_reset_fp64(matrix3x2_fp64_t* matrix)
|
||||
inline void bgc_matrix3x2_reset_fp64(bgc_matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 0.0;
|
||||
matrix->r1c2 = 0.0;
|
||||
|
@ -31,7 +31,7 @@ inline void matrix3x2_reset_fp64(matrix3x2_fp64_t* matrix)
|
|||
|
||||
// ==================== Copy ==================== //
|
||||
|
||||
inline void matrix3x2_copy_fp32(const matrix3x2_fp32_t* from, matrix3x2_fp32_t* to)
|
||||
inline void bgc_matrix3x2_copy_fp32(const bgc_matrix3x2_fp32_t* from, bgc_matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
@ -42,7 +42,7 @@ inline void matrix3x2_copy_fp32(const matrix3x2_fp32_t* from, matrix3x2_fp32_t*
|
|||
to->r2c3 = from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_copy_fp64(const matrix3x2_fp64_t* from, matrix3x2_fp64_t* to)
|
||||
inline void bgc_matrix3x2_copy_fp64(const bgc_matrix3x2_fp64_t* from, bgc_matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
@ -55,7 +55,7 @@ inline void matrix3x2_copy_fp64(const matrix3x2_fp64_t* from, matrix3x2_fp64_t*
|
|||
|
||||
// ==================== Swap ==================== //
|
||||
|
||||
inline void matrix3x2_swap_fp32(matrix3x2_fp32_t* matrix1, matrix3x2_fp32_t* matrix2)
|
||||
inline void bgc_matrix3x2_swap_fp32(bgc_matrix3x2_fp32_t* matrix1, bgc_matrix3x2_fp32_t* matrix2)
|
||||
{
|
||||
const float r1c1 = matrix2->r1c1;
|
||||
const float r1c2 = matrix2->r1c2;
|
||||
|
@ -82,7 +82,7 @@ inline void matrix3x2_swap_fp32(matrix3x2_fp32_t* matrix1, matrix3x2_fp32_t* mat
|
|||
matrix1->r2c3 = r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_swap_fp64(matrix3x2_fp64_t* matrix1, matrix3x2_fp64_t* matrix2)
|
||||
inline void bgc_matrix3x2_swap_fp64(bgc_matrix3x2_fp64_t* matrix1, bgc_matrix3x2_fp64_t* matrix2)
|
||||
{
|
||||
const double r1c1 = matrix2->r1c1;
|
||||
const double r1c2 = matrix2->r1c2;
|
||||
|
@ -111,7 +111,7 @@ inline void matrix3x2_swap_fp64(matrix3x2_fp64_t* matrix1, matrix3x2_fp64_t* mat
|
|||
|
||||
// ============= Set from twin type ============= //
|
||||
|
||||
inline void matrix3x2_convert_fp64_to_fp32(const matrix3x2_fp64_t* from, matrix3x2_fp32_t* to)
|
||||
inline void bgc_matrix3x2_convert_fp64_to_fp32(const bgc_matrix3x2_fp64_t* from, bgc_matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r1c2;
|
||||
|
@ -122,7 +122,7 @@ inline void matrix3x2_convert_fp64_to_fp32(const matrix3x2_fp64_t* from, matrix3
|
|||
to->r2c3 = (float) from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_convert_fp32_to_fp64(const matrix3x2_fp32_t* from, matrix3x2_fp64_t* to)
|
||||
inline void bgc_matrix3x2_convert_fp32_to_fp64(const bgc_matrix3x2_fp32_t* from, bgc_matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
@ -135,7 +135,7 @@ inline void matrix3x2_convert_fp32_to_fp64(const matrix3x2_fp32_t* from, matrix3
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix3x2_set_transposed_fp32(const matrix2x3_fp32_t* from, matrix3x2_fp32_t* to)
|
||||
inline void bgc_matrix3x2_set_transposed_fp32(const bgc_matrix2x3_fp32_t* from, bgc_matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
@ -146,7 +146,7 @@ inline void matrix3x2_set_transposed_fp32(const matrix2x3_fp32_t* from, matrix3x
|
|||
to->r2c3 = from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_transposed_fp64(const matrix2x3_fp64_t* from, matrix3x2_fp64_t* to)
|
||||
inline void bgc_matrix3x2_set_transposed_fp64(const bgc_matrix2x3_fp64_t* from, bgc_matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
@ -159,7 +159,7 @@ inline void matrix3x2_set_transposed_fp64(const matrix2x3_fp64_t* from, matrix3x
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix3x2_set_transposed_fp32_fp64(const matrix2x3_fp64_t* from, matrix3x2_fp32_t* to)
|
||||
inline void bgc_matrix3x2_set_transposed_fp32_fp64(const bgc_matrix2x3_fp64_t* from, bgc_matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r2c1;
|
||||
|
@ -170,7 +170,7 @@ inline void matrix3x2_set_transposed_fp32_fp64(const matrix2x3_fp64_t* from, mat
|
|||
to->r2c3 = (float) from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_transposed_fp64_fp32(const matrix2x3_fp32_t* from, matrix3x2_fp64_t* to)
|
||||
inline void bgc_matrix3x2_set_transposed_fp64_fp32(const bgc_matrix2x3_fp32_t* from, bgc_matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
@ -183,14 +183,14 @@ inline void matrix3x2_set_transposed_fp64_fp32(const matrix2x3_fp32_t* from, mat
|
|||
|
||||
// ================= Set Row 1 ================== //
|
||||
|
||||
inline void matrix3x2_set_row1_fp32(const float c1, const float c2, const float c3, matrix3x2_fp32_t* matrix)
|
||||
inline void bgc_matrix3x2_set_row1_fp32(const float c1, const float c2, const float c3, bgc_matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
matrix->r1c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_row1_fp64(const double c1, const double c2, const double c3, matrix3x2_fp64_t* matrix)
|
||||
inline void bgc_matrix3x2_set_row1_fp64(const double c1, const double c2, const double c3, bgc_matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
|
@ -199,14 +199,14 @@ inline void matrix3x2_set_row1_fp64(const double c1, const double c2, const doub
|
|||
|
||||
// ================= Set Row 2 ================== //
|
||||
|
||||
inline void matrix3x2_set_row2_fp32(const float c1, const float c2, const float c3, matrix3x2_fp32_t* matrix)
|
||||
inline void bgc_matrix3x2_set_row2_fp32(const float c1, const float c2, const float c3, bgc_matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
matrix->r2c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_row2_fp64(const double c1, const double c2, const double c3, matrix3x2_fp64_t* matrix)
|
||||
inline void bgc_matrix3x2_set_row2_fp64(const double c1, const double c2, const double c3, bgc_matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
|
@ -215,13 +215,13 @@ inline void matrix3x2_set_row2_fp64(const double c1, const double c2, const doub
|
|||
|
||||
// ================ Set Column 1 ================ //
|
||||
|
||||
inline void matrix3x2_set_column1_fp32(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
inline void bgc_matrix3x2_set_column1_fp32(const float r1, const float r2, bgc_matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_column1_fp64(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
inline void bgc_matrix3x2_set_column1_fp64(const double r1, const double r2, bgc_matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
|
@ -229,13 +229,13 @@ inline void matrix3x2_set_column1_fp64(const double r1, const double r2, matrix3
|
|||
|
||||
// ================ Set Column 2 ================ //
|
||||
|
||||
inline void matrix3x2_set_column2_fp32(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
inline void bgc_matrix3x2_set_column2_fp32(const float r1, const float r2, bgc_matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_column2_fp64(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
inline void bgc_matrix3x2_set_column2_fp64(const double r1, const double r2, bgc_matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
|
@ -243,45 +243,21 @@ inline void matrix3x2_set_column2_fp64(const double r1, const double r2, matrix3
|
|||
|
||||
// ================ Set Column 3 ================ //
|
||||
|
||||
inline void matrix3x2_set_column3_fp32(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
inline void bgc_matrix3x2_set_column3_fp32(const float r1, const float r2, bgc_matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c3 = r1;
|
||||
matrix->r2c3 = r2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_set_column3_fp64(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
inline void bgc_matrix3x2_set_column3_fp64(const double r1, const double r2, bgc_matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c3 = r1;
|
||||
matrix->r2c3 = r2;
|
||||
}
|
||||
|
||||
// ================ Append scaled =============== //
|
||||
|
||||
inline void matrix3x2_add_scaled_fp32(matrix3x2_fp32_t* basic_vector, const matrix3x2_fp32_t* scalable_vector, const float scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
basic_vector->r1c3 += scalable_vector->r1c3 * scale;
|
||||
|
||||
basic_vector->r2c1 += scalable_vector->r2c1 * scale;
|
||||
basic_vector->r2c2 += scalable_vector->r2c2 * scale;
|
||||
basic_vector->r2c3 += scalable_vector->r2c3 * scale;
|
||||
}
|
||||
|
||||
inline void matrix3x2_add_scaled_fp64(matrix3x2_fp64_t* basic_vector, const matrix3x2_fp64_t* scalable_vector, const double scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
basic_vector->r1c3 += scalable_vector->r1c3 * scale;
|
||||
|
||||
basic_vector->r2c1 += scalable_vector->r2c1 * scale;
|
||||
basic_vector->r2c2 += scalable_vector->r2c2 * scale;
|
||||
basic_vector->r2c3 += scalable_vector->r2c3 * scale;
|
||||
}
|
||||
|
||||
// ================== Addition ================== //
|
||||
|
||||
inline void matrix3x2_add_fp32(const matrix3x2_fp32_t* matrix1, const matrix3x2_fp32_t* matrix2, matrix3x2_fp32_t* sum)
|
||||
inline void bgc_matrix3x2_add_fp32(const bgc_matrix3x2_fp32_t* matrix1, const bgc_matrix3x2_fp32_t* matrix2, bgc_matrix3x2_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -292,7 +268,7 @@ inline void matrix3x2_add_fp32(const matrix3x2_fp32_t* matrix1, const matrix3x2_
|
|||
sum->r2c3 = matrix1->r2c3 + matrix2->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_add_fp64(const matrix3x2_fp64_t* matrix1, const matrix3x2_fp64_t* matrix2, matrix3x2_fp64_t* sum)
|
||||
inline void bgc_matrix3x2_add_fp64(const bgc_matrix3x2_fp64_t* matrix1, const bgc_matrix3x2_fp64_t* matrix2, bgc_matrix3x2_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -303,9 +279,33 @@ inline void matrix3x2_add_fp64(const matrix3x2_fp64_t* matrix1, const matrix3x2_
|
|||
sum->r2c3 = matrix1->r2c3 + matrix2->r2c3;
|
||||
}
|
||||
|
||||
// ================= Add scaled ================= //
|
||||
|
||||
inline void bgc_matrix3x2_add_scaled_fp32(const bgc_matrix3x2_fp32_t* basic_matrix, const bgc_matrix3x2_fp32_t* scalable_matrix, const float scale, bgc_matrix3x2_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
|
||||
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
|
||||
sum->r1c3 = basic_matrix->r1c3 + scalable_matrix->r1c3 * scale;
|
||||
|
||||
sum->r2c1 = basic_matrix->r2c1 + scalable_matrix->r2c1 * scale;
|
||||
sum->r2c2 = basic_matrix->r2c2 + scalable_matrix->r2c2 * scale;
|
||||
sum->r2c3 = basic_matrix->r2c3 + scalable_matrix->r2c3 * scale;
|
||||
}
|
||||
|
||||
inline void bgc_matrix3x2_add_scaled_fp64(const bgc_matrix3x2_fp64_t* basic_matrix, const bgc_matrix3x2_fp64_t* scalable_matrix, const double scale, bgc_matrix3x2_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
|
||||
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
|
||||
sum->r1c3 = basic_matrix->r1c3 + scalable_matrix->r1c3 * scale;
|
||||
|
||||
sum->r2c1 = basic_matrix->r2c1 + scalable_matrix->r2c1 * scale;
|
||||
sum->r2c2 = basic_matrix->r2c2 + scalable_matrix->r2c2 * scale;
|
||||
sum->r2c3 = basic_matrix->r2c3 + scalable_matrix->r2c3 * scale;
|
||||
}
|
||||
|
||||
// ================ Subtraction ================= //
|
||||
|
||||
inline void matrix3x2_subtract_fp32(const matrix3x2_fp32_t* minuend, const matrix3x2_fp32_t* subtrahend, matrix3x2_fp32_t* difference)
|
||||
inline void bgc_matrix3x2_subtract_fp32(const bgc_matrix3x2_fp32_t* minuend, const bgc_matrix3x2_fp32_t* subtrahend, bgc_matrix3x2_fp32_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -316,7 +316,7 @@ inline void matrix3x2_subtract_fp32(const matrix3x2_fp32_t* minuend, const matri
|
|||
difference->r2c3 = minuend->r2c3 - subtrahend->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_subtract_fp64(const matrix3x2_fp64_t* minuend, const matrix3x2_fp64_t* subtrahend, matrix3x2_fp64_t* difference)
|
||||
inline void bgc_matrix3x2_subtract_fp64(const bgc_matrix3x2_fp64_t* minuend, const bgc_matrix3x2_fp64_t* subtrahend, bgc_matrix3x2_fp64_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -329,7 +329,7 @@ inline void matrix3x2_subtract_fp64(const matrix3x2_fp64_t* minuend, const matri
|
|||
|
||||
// =============== Multiplication =============== //
|
||||
|
||||
inline void matrix3x2_multiply_fp32(const matrix3x2_fp32_t* multiplicand, const float multiplier, matrix3x2_fp32_t* product)
|
||||
inline void bgc_matrix3x2_multiply_fp32(const bgc_matrix3x2_fp32_t* multiplicand, const float multiplier, bgc_matrix3x2_fp32_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
@ -340,7 +340,7 @@ inline void matrix3x2_multiply_fp32(const matrix3x2_fp32_t* multiplicand, const
|
|||
product->r2c3 = multiplicand->r2c3 * multiplier;
|
||||
}
|
||||
|
||||
inline void matrix3x2_multiply_fp64(const matrix3x2_fp64_t* multiplicand, const double multiplier, matrix3x2_fp64_t* product)
|
||||
inline void bgc_matrix3x2_multiply_fp64(const bgc_matrix3x2_fp64_t* multiplicand, const double multiplier, bgc_matrix3x2_fp64_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
@ -353,26 +353,26 @@ inline void matrix3x2_multiply_fp64(const matrix3x2_fp64_t* multiplicand, const
|
|||
|
||||
// ================== Division ================== //
|
||||
|
||||
inline void matrix3x2_divide_fp32(const matrix3x2_fp32_t* dividend, const float divisor, matrix3x2_fp32_t* quotient)
|
||||
inline void bgc_matrix3x2_divide_fp32(const bgc_matrix3x2_fp32_t* dividend, const float divisor, bgc_matrix3x2_fp32_t* quotient)
|
||||
{
|
||||
matrix3x2_multiply_fp32(dividend, 1.0f / divisor, quotient);
|
||||
bgc_matrix3x2_multiply_fp32(dividend, 1.0f / divisor, quotient);
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_divide(const matrix3x2_fp64_t* dividend, const double divisor, matrix3x2_fp64_t* quotient)
|
||||
inline void bgc_matrix3x2_divide_fp64(const bgc_matrix3x2_fp64_t* dividend, const double divisor, bgc_matrix3x2_fp64_t* quotient)
|
||||
{
|
||||
matrix3x2_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
bgc_matrix3x2_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
}
|
||||
|
||||
// ============ Left Vector Product ============= //
|
||||
|
||||
inline void matrix3x2_left_product_fp32(const vector2_fp32_t* vector, const matrix3x2_fp32_t* matrix, vector3_fp32_t* result)
|
||||
inline void bgc_matrix3x2_left_product_fp32(const bgc_vector2_fp32_t* vector, const bgc_matrix3x2_fp32_t* matrix, bgc_vector3_fp32_t* result)
|
||||
{
|
||||
result->x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1;
|
||||
result->x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2;
|
||||
result->x3 = vector->x1 * matrix->r1c3 + vector->x2 * matrix->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_left_product_fp64(const vector2_fp64_t* vector, const matrix3x2_fp64_t* matrix, vector3_fp64_t* result)
|
||||
inline void bgc_matrix3x2_left_product_fp64(const bgc_vector2_fp64_t* vector, const bgc_matrix3x2_fp64_t* matrix, bgc_vector3_fp64_t* result)
|
||||
{
|
||||
result->x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1;
|
||||
result->x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2;
|
||||
|
@ -381,13 +381,13 @@ inline void matrix3x2_left_product_fp64(const vector2_fp64_t* vector, const matr
|
|||
|
||||
// ============ Right Vector Product ============ //
|
||||
|
||||
inline void matrix3x2_right_product_fp32(const matrix3x2_fp32_t* matrix, const vector3_fp32_t* vector, vector2_fp32_t* result)
|
||||
inline void bgc_matrix3x2_right_product_fp32(const bgc_matrix3x2_fp32_t* matrix, const bgc_vector3_fp32_t* vector, bgc_vector2_fp32_t* result)
|
||||
{
|
||||
result->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2 + matrix->r1c3 * vector->x3;
|
||||
result->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2 + matrix->r2c3 * vector->x3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_right_product_fp64(const matrix3x2_fp64_t* matrix, const vector3_fp64_t* vector, vector2_fp64_t* result)
|
||||
inline void bgc_matrix3x2_right_product_fp64(const bgc_matrix3x2_fp64_t* matrix, const bgc_vector3_fp64_t* vector, bgc_vector2_fp64_t* result)
|
||||
{
|
||||
result->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2 + matrix->r1c3 * vector->x3;
|
||||
result->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2 + matrix->r2c3 * vector->x3;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue