Завершение большого переименования
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_MATRIX2X3_H_
|
||||
#define _BASIC_GEOMETRY_MATRIX2X3_H_
|
||||
#ifndef _BGC_MATRIX2X3_H_
|
||||
#define _BGC_MATRIX2X3_H_
|
||||
|
||||
#include "vector2.h"
|
||||
#include "vector3.h"
|
||||
|
|
@ -7,7 +7,7 @@
|
|||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
inline void matrix2x3_reset_fp32(matrix2x3_fp32_t* matrix)
|
||||
inline void bgc_matrix2x3_reset_fp32(bgc_matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 0.0f;
|
||||
matrix->r1c2 = 0.0f;
|
||||
|
|
@ -19,7 +19,7 @@ inline void matrix2x3_reset_fp32(matrix2x3_fp32_t* matrix)
|
|||
matrix->r3c2 = 0.0f;
|
||||
}
|
||||
|
||||
inline void matrix2x3_reset_fp64(matrix2x3_fp64_t* matrix)
|
||||
inline void bgc_matrix2x3_reset_fp64(bgc_matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 0.0;
|
||||
matrix->r1c2 = 0.0;
|
||||
|
|
@ -33,7 +33,7 @@ inline void matrix2x3_reset_fp64(matrix2x3_fp64_t* matrix)
|
|||
|
||||
// ==================== Copy ==================== //
|
||||
|
||||
inline void matrix2x3_copy_fp32(const matrix2x3_fp32_t* from, matrix2x3_fp32_t* to)
|
||||
inline void bgc_matrix2x3_copy_fp32(const bgc_matrix2x3_fp32_t* from, bgc_matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
|
@ -45,7 +45,7 @@ inline void matrix2x3_copy_fp32(const matrix2x3_fp32_t* from, matrix2x3_fp32_t*
|
|||
to->r3c2 = from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_copy_fp64(const matrix2x3_fp64_t* from, matrix2x3_fp64_t* to)
|
||||
inline void bgc_matrix2x3_copy_fp64(const bgc_matrix2x3_fp64_t* from, bgc_matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
|
@ -59,7 +59,7 @@ inline void matrix2x3_copy_fp64(const matrix2x3_fp64_t* from, matrix2x3_fp64_t*
|
|||
|
||||
// ==================== Swap ==================== //
|
||||
|
||||
inline void matrix2x3_swap_fp32(matrix2x3_fp32_t* matrix1, matrix2x3_fp32_t* matrix2)
|
||||
inline void bgc_matrix2x3_swap_fp32(bgc_matrix2x3_fp32_t* matrix1, bgc_matrix2x3_fp32_t* matrix2)
|
||||
{
|
||||
const float r1c1 = matrix2->r1c1;
|
||||
const float r1c2 = matrix2->r1c2;
|
||||
|
|
@ -89,7 +89,7 @@ inline void matrix2x3_swap_fp32(matrix2x3_fp32_t* matrix1, matrix2x3_fp32_t* mat
|
|||
matrix1->r3c2 = r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_swap_fp64(matrix2x3_fp64_t* matrix1, matrix2x3_fp64_t* matrix2)
|
||||
inline void bgc_matrix2x3_swap_fp64(bgc_matrix2x3_fp64_t* matrix1, bgc_matrix2x3_fp64_t* matrix2)
|
||||
{
|
||||
const double r1c1 = matrix2->r1c1;
|
||||
const double r1c2 = matrix2->r1c2;
|
||||
|
|
@ -121,7 +121,7 @@ inline void matrix2x3_swap_fp64(matrix2x3_fp64_t* matrix1, matrix2x3_fp64_t* mat
|
|||
|
||||
// ============= Copy to twin type ============== //
|
||||
|
||||
inline void matrix2x3_convert_fp64_to_fp32(const matrix2x3_fp64_t* from, matrix2x3_fp32_t* to)
|
||||
inline void bgc_matrix2x3_convert_fp64_to_fp32(const bgc_matrix2x3_fp64_t* from, bgc_matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r1c2;
|
||||
|
|
@ -133,7 +133,7 @@ inline void matrix2x3_convert_fp64_to_fp32(const matrix2x3_fp64_t* from, matrix2
|
|||
to->r3c2 = (float) from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_convert_fp32_to_fp64(const matrix2x3_fp32_t* from, matrix2x3_fp64_t* to)
|
||||
inline void bgc_matrix2x3_convert_fp32_to_fp64(const bgc_matrix2x3_fp32_t* from, bgc_matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
|
@ -147,7 +147,7 @@ inline void matrix2x3_convert_fp32_to_fp64(const matrix2x3_fp32_t* from, matrix2
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix2x3_set_transposed_fp32(const matrix3x2_fp32_t* from, matrix2x3_fp32_t* to)
|
||||
inline void bgc_matrix2x3_set_transposed_fp32(const bgc_matrix3x2_fp32_t* from, bgc_matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
|
@ -159,7 +159,7 @@ inline void matrix2x3_set_transposed_fp32(const matrix3x2_fp32_t* from, matrix2x
|
|||
to->r3c2 = from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_transposed_fp64(const matrix3x2_fp64_t* from, matrix2x3_fp64_t* to)
|
||||
inline void bgc_matrix2x3_set_transposed_fp64(const bgc_matrix3x2_fp64_t* from, bgc_matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
|
@ -173,7 +173,7 @@ inline void matrix2x3_set_transposed_fp64(const matrix3x2_fp64_t* from, matrix2x
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix2x3_set_transposed_fp32_fp64(const matrix3x2_fp64_t* from, matrix2x3_fp32_t* to)
|
||||
inline void bgc_matrix2x3_set_transposed_fp32_fp64(const bgc_matrix3x2_fp64_t* from, bgc_matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r2c1;
|
||||
|
|
@ -185,7 +185,7 @@ inline void matrix2x3_set_transposed_fp32_fp64(const matrix3x2_fp64_t* from, mat
|
|||
to->r3c2 = (float) from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_transposed_fp64_fp32(const matrix3x2_fp32_t* from, matrix2x3_fp64_t* to)
|
||||
inline void bgc_matrix2x3_set_transposed_fp64_fp32(const bgc_matrix3x2_fp32_t* from, bgc_matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
|
@ -199,13 +199,13 @@ inline void matrix2x3_set_transposed_fp64_fp32(const matrix3x2_fp32_t* from, mat
|
|||
|
||||
// ================= Set Row 1 ================== //
|
||||
|
||||
inline void matrix2x3_set_row1_fp32(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
inline void bgc_matrix2x3_set_row1_fp32(const float c1, const float c2, bgc_matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_row1_fp64(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
inline void bgc_matrix2x3_set_row1_fp64(const double c1, const double c2, bgc_matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
|
|
@ -213,13 +213,13 @@ inline void matrix2x3_set_row1_fp64(const double c1, const double c2, matrix2x3_
|
|||
|
||||
// ================= Set Row 2 ================== //
|
||||
|
||||
inline void matrix2x3_set_row2_fp32(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
inline void bgc_matrix2x3_set_row2_fp32(const float c1, const float c2, bgc_matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_row2_fp64(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
inline void bgc_matrix2x3_set_row2_fp64(const double c1, const double c2, bgc_matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
|
|
@ -227,13 +227,13 @@ inline void matrix2x3_set_row2_fp64(const double c1, const double c2, matrix2x3_
|
|||
|
||||
// ================= Set Row 3 ================== //
|
||||
|
||||
inline void matrix2x3_set_row3_fp32(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
inline void bgc_matrix2x3_set_row3_fp32(const float c1, const float c2, bgc_matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r3c1 = c1;
|
||||
matrix->r3c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_row3_fp64(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
inline void bgc_matrix2x3_set_row3_fp64(const double c1, const double c2, bgc_matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r3c1 = c1;
|
||||
matrix->r3c2 = c2;
|
||||
|
|
@ -241,14 +241,14 @@ inline void matrix2x3_set_row3_fp64(const double c1, const double c2, matrix2x3_
|
|||
|
||||
// ================ Set Column 1 ================ //
|
||||
|
||||
inline void matrix2x3_set_column1_fp32(const float r1, const float r2, const float r3, matrix2x3_fp32_t* matrix)
|
||||
inline void bgc_matrix2x3_set_column1_fp32(const float r1, const float r2, const float r3, bgc_matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
matrix->r3c1 = r3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_column1_fp64(const double r1, const double r2, const double r3, matrix2x3_fp64_t* matrix)
|
||||
inline void bgc_matrix2x3_set_column1_fp64(const double r1, const double r2, const double r3, bgc_matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
|
|
@ -257,49 +257,23 @@ inline void matrix2x3_set_column1_fp64(const double r1, const double r2, const d
|
|||
|
||||
// ================ Set Column 2 ================ //
|
||||
|
||||
inline void matrix2x3_set_column2_fp32(const float r1, const float r2, const float r3, matrix2x3_fp32_t* matrix)
|
||||
inline void bgc_matrix2x3_set_column2_fp32(const float r1, const float r2, const float r3, bgc_matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
matrix->r3c2 = r3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_set_column2_fp64(const double r1, const double r2, const double r3, matrix2x3_fp64_t* matrix)
|
||||
inline void bgc_matrix2x3_set_column2_fp64(const double r1, const double r2, const double r3, bgc_matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
matrix->r3c2 = r3;
|
||||
}
|
||||
|
||||
// ================ Append scaled =============== //
|
||||
|
||||
inline void matrix2x3_add_scaled_fp32(matrix2x3_fp32_t* basic_vector, const matrix2x3_fp32_t* scalable_vector, const float scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
|
||||
basic_vector->r2c1 += scalable_vector->r2c1 * scale;
|
||||
basic_vector->r2c2 += scalable_vector->r2c2 * scale;
|
||||
|
||||
basic_vector->r3c1 += scalable_vector->r3c1 * scale;
|
||||
basic_vector->r3c2 += scalable_vector->r3c2 * scale;
|
||||
}
|
||||
|
||||
inline void matrix2x3_add_scaled_fp64(matrix2x3_fp64_t* basic_vector, const matrix2x3_fp64_t* scalable_vector, const double scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
|
||||
basic_vector->r2c1 += scalable_vector->r2c1 * scale;
|
||||
basic_vector->r2c2 += scalable_vector->r2c2 * scale;
|
||||
|
||||
basic_vector->r3c1 += scalable_vector->r3c1 * scale;
|
||||
basic_vector->r3c2 += scalable_vector->r3c2 * scale;
|
||||
}
|
||||
|
||||
// ================== Addition ================== //
|
||||
|
||||
inline void matrix2x3_add_fp32(const matrix2x3_fp32_t* matrix1, const matrix2x3_fp32_t* matrix2, matrix2x3_fp32_t* sum)
|
||||
inline void bgc_matrix2x3_add_fp32(const bgc_matrix2x3_fp32_t* matrix1, const bgc_matrix2x3_fp32_t* matrix2, bgc_matrix2x3_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
|
@ -311,7 +285,7 @@ inline void matrix2x3_add_fp32(const matrix2x3_fp32_t* matrix1, const matrix2x3_
|
|||
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_add_fp64(const matrix2x3_fp64_t* matrix1, const matrix2x3_fp64_t* matrix2, matrix2x3_fp64_t* sum)
|
||||
inline void bgc_matrix2x3_add_fp64(const bgc_matrix2x3_fp64_t* matrix1, const bgc_matrix2x3_fp64_t* matrix2, bgc_matrix2x3_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
|
@ -323,9 +297,35 @@ inline void matrix2x3_add_fp64(const matrix2x3_fp64_t* matrix1, const matrix2x3_
|
|||
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
|
||||
}
|
||||
|
||||
// ================= Add scaled ================= //
|
||||
|
||||
inline void bgc_matrix2x3_add_scaled_fp32(const bgc_matrix2x3_fp32_t* basic_matrix, const bgc_matrix2x3_fp32_t* scalable_matrix, const float scale, bgc_matrix2x3_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
|
||||
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
|
||||
|
||||
sum->r2c1 = basic_matrix->r2c1 + scalable_matrix->r2c1 * scale;
|
||||
sum->r2c2 = basic_matrix->r2c2 + scalable_matrix->r2c2 * scale;
|
||||
|
||||
sum->r3c1 = basic_matrix->r3c1 + scalable_matrix->r3c1 * scale;
|
||||
sum->r3c2 = basic_matrix->r3c2 + scalable_matrix->r3c2 * scale;
|
||||
}
|
||||
|
||||
inline void bgc_matrix2x3_add_scaled_fp64(const bgc_matrix2x3_fp64_t* basic_matrix, const bgc_matrix2x3_fp64_t* scalable_matrix, const double scale, bgc_matrix2x3_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
|
||||
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
|
||||
|
||||
sum->r2c1 = basic_matrix->r2c1 + scalable_matrix->r2c1 * scale;
|
||||
sum->r2c2 = basic_matrix->r2c2 + scalable_matrix->r2c2 * scale;
|
||||
|
||||
sum->r3c1 = basic_matrix->r3c1 + scalable_matrix->r3c1 * scale;
|
||||
sum->r3c2 = basic_matrix->r3c2 + scalable_matrix->r3c2 * scale;
|
||||
}
|
||||
|
||||
// ================ Subtraction ================= //
|
||||
|
||||
inline void matrix2x3_subtract_fp32(const matrix2x3_fp32_t* minuend, const matrix2x3_fp32_t* subtrahend, matrix2x3_fp32_t* difference)
|
||||
inline void bgc_matrix2x3_subtract_fp32(const bgc_matrix2x3_fp32_t* minuend, const bgc_matrix2x3_fp32_t* subtrahend, bgc_matrix2x3_fp32_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
|
@ -337,7 +337,7 @@ inline void matrix2x3_subtract_fp32(const matrix2x3_fp32_t* minuend, const matri
|
|||
difference->r3c2 = minuend->r3c2 - subtrahend->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_subtract_fp64(const matrix2x3_fp64_t* minuend, const matrix2x3_fp64_t* subtrahend, matrix2x3_fp64_t* difference)
|
||||
inline void bgc_matrix2x3_subtract_fp64(const bgc_matrix2x3_fp64_t* minuend, const bgc_matrix2x3_fp64_t* subtrahend, bgc_matrix2x3_fp64_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
|
@ -351,7 +351,7 @@ inline void matrix2x3_subtract_fp64(const matrix2x3_fp64_t* minuend, const matri
|
|||
|
||||
// =============== Multiplication =============== //
|
||||
|
||||
inline void matrix2x3_multiply_fp32(const matrix2x3_fp32_t* multiplicand, const float multiplier, matrix2x3_fp32_t* product)
|
||||
inline void bgc_matrix2x3_multiply_fp32(const bgc_matrix2x3_fp32_t* multiplicand, const float multiplier, bgc_matrix2x3_fp32_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
|
@ -363,7 +363,7 @@ inline void matrix2x3_multiply_fp32(const matrix2x3_fp32_t* multiplicand, const
|
|||
product->r3c2 = multiplicand->r3c2 * multiplier;
|
||||
}
|
||||
|
||||
inline void matrix2x3_multiply_fp64(const matrix2x3_fp64_t* multiplicand, const double multiplier, matrix2x3_fp64_t* product)
|
||||
inline void bgc_matrix2x3_multiply_fp64(const bgc_matrix2x3_fp64_t* multiplicand, const double multiplier, bgc_matrix2x3_fp64_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
|
@ -377,25 +377,25 @@ inline void matrix2x3_multiply_fp64(const matrix2x3_fp64_t* multiplicand, const
|
|||
|
||||
// ================== Division ================== //
|
||||
|
||||
inline void matrix2x3_divide_fp32(const matrix2x3_fp32_t* dividend, const float divisor, matrix2x3_fp32_t* quotient)
|
||||
inline void bgc_matrix2x3_divide_fp32(const bgc_matrix2x3_fp32_t* dividend, const float divisor, bgc_matrix2x3_fp32_t* quotient)
|
||||
{
|
||||
matrix2x3_multiply_fp32(dividend, 1.0f / divisor, quotient);
|
||||
bgc_matrix2x3_multiply_fp32(dividend, 1.0f / divisor, quotient);
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_divide(const matrix2x3_fp64_t* dividend, const double divisor, matrix2x3_fp64_t* quotient)
|
||||
inline void bgc_matrix2x3_divide_fp64(const bgc_matrix2x3_fp64_t* dividend, const double divisor, bgc_matrix2x3_fp64_t* quotient)
|
||||
{
|
||||
matrix2x3_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
bgc_matrix2x3_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
}
|
||||
|
||||
// ============ Left Vector Product ============= //
|
||||
|
||||
inline void matrix2x3_left_product_fp32(const vector3_fp32_t* vector, const matrix2x3_fp32_t* matrix, vector2_fp32_t* result)
|
||||
inline void bgc_matrix2x3_left_product_fp32(const bgc_vector3_fp32_t* vector, const bgc_matrix2x3_fp32_t* matrix, bgc_vector2_fp32_t* result)
|
||||
{
|
||||
result->x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1 + vector->x3 * matrix->r3c1;
|
||||
result->x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2 + vector->x3 * matrix->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_left_product_fp64(const vector3_fp64_t* vector, const matrix2x3_fp64_t* matrix, vector2_fp64_t* result)
|
||||
inline void bgc_matrix2x3_left_product_fp64(const bgc_vector3_fp64_t* vector, const bgc_matrix2x3_fp64_t* matrix, bgc_vector2_fp64_t* result)
|
||||
{
|
||||
result->x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1 + vector->x3 * matrix->r3c1;
|
||||
result->x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2 + vector->x3 * matrix->r3c2;
|
||||
|
|
@ -403,14 +403,14 @@ inline void matrix2x3_left_product_fp64(const vector3_fp64_t* vector, const matr
|
|||
|
||||
// ============ Right Vector Product ============ //
|
||||
|
||||
inline void matrix2x3_right_product_fp32(const matrix2x3_fp32_t* matrix, const vector2_fp32_t* vector, vector3_fp32_t* result)
|
||||
inline void bgc_matrix2x3_right_product_fp32(const bgc_matrix2x3_fp32_t* matrix, const bgc_vector2_fp32_t* vector, bgc_vector3_fp32_t* result)
|
||||
{
|
||||
result->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
|
||||
result->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
|
||||
result->x3 = matrix->r3c1 * vector->x1 + matrix->r3c2 * vector->x2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_right_product_fp64(const matrix2x3_fp64_t* matrix, const vector2_fp64_t* vector, vector3_fp64_t* result)
|
||||
inline void bgc_matrix2x3_right_product_fp64(const bgc_matrix2x3_fp64_t* matrix, const bgc_vector2_fp64_t* vector, bgc_vector3_fp64_t* result)
|
||||
{
|
||||
result->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
|
||||
result->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue