Переход на парадигму Destination first в порядке параметров функий
This commit is contained in:
parent
f7e41645fe
commit
03627f4401
41 changed files with 1570 additions and 1978 deletions
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "vector2.h"
|
||||
#include "vector3.h"
|
||||
#include "matrixes.h"
|
||||
#include "matrices.h"
|
||||
|
||||
// =================== Reset ==================== //
|
||||
|
||||
|
|
@ -33,7 +33,7 @@ inline void bgc_fp64_matrix2x3_reset(BGC_FP64_Matrix2x3* matrix)
|
|||
|
||||
// ==================== Copy ==================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_copy(const BGC_FP32_Matrix2x3* source, BGC_FP32_Matrix2x3* destination)
|
||||
inline void bgc_fp32_matrix2x3_copy(BGC_FP32_Matrix2x3* destination, const BGC_FP32_Matrix2x3* source)
|
||||
{
|
||||
destination->r1c1 = source->r1c1;
|
||||
destination->r1c2 = source->r1c2;
|
||||
|
|
@ -45,7 +45,7 @@ inline void bgc_fp32_matrix2x3_copy(const BGC_FP32_Matrix2x3* source, BGC_FP32_M
|
|||
destination->r3c2 = source->r3c2;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_copy(const BGC_FP64_Matrix2x3* source, BGC_FP64_Matrix2x3* destination)
|
||||
inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* destination, const BGC_FP64_Matrix2x3* source)
|
||||
{
|
||||
destination->r1c1 = source->r1c1;
|
||||
destination->r1c2 = source->r1c2;
|
||||
|
|
@ -121,7 +121,7 @@ inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* matrix1, BGC_FP64_Matrix
|
|||
|
||||
// ================== Convert =================== //
|
||||
|
||||
inline void bgc_fp64_matrix2x3_convert_to_fp32(const BGC_FP64_Matrix2x3* source, BGC_FP32_Matrix2x3* destination)
|
||||
inline void bgc_fp64_matrix2x3_convert_to_fp32(BGC_FP32_Matrix2x3* destination, const BGC_FP64_Matrix2x3* source)
|
||||
{
|
||||
destination->r1c1 = (float)source->r1c1;
|
||||
destination->r1c2 = (float)source->r1c2;
|
||||
|
|
@ -133,7 +133,7 @@ inline void bgc_fp64_matrix2x3_convert_to_fp32(const BGC_FP64_Matrix2x3* source,
|
|||
destination->r3c2 = (float)source->r3c2;
|
||||
}
|
||||
|
||||
inline void bgc_fp32_matrix2x3_convert_to_fp64(const BGC_FP32_Matrix2x3* source, BGC_FP64_Matrix2x3* destination)
|
||||
inline void bgc_fp32_matrix2x3_convert_to_fp64(BGC_FP64_Matrix2x3* destination, const BGC_FP32_Matrix2x3* source)
|
||||
{
|
||||
destination->r1c1 = source->r1c1;
|
||||
destination->r1c2 = source->r1c2;
|
||||
|
|
@ -147,7 +147,7 @@ inline void bgc_fp32_matrix2x3_convert_to_fp64(const BGC_FP32_Matrix2x3* source,
|
|||
|
||||
// ================= Transpose ================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_get_transposed(const BGC_FP32_Matrix3x2* matrix, BGC_FP32_Matrix2x3* transposed)
|
||||
inline void bgc_fp32_matrix2x3_get_transposed(BGC_FP32_Matrix2x3* transposed, const BGC_FP32_Matrix3x2* matrix)
|
||||
{
|
||||
transposed->r1c1 = matrix->r1c1;
|
||||
transposed->r1c2 = matrix->r2c1;
|
||||
|
|
@ -159,7 +159,7 @@ inline void bgc_fp32_matrix2x3_get_transposed(const BGC_FP32_Matrix3x2* matrix,
|
|||
transposed->r3c2 = matrix->r2c3;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_get_transposed(const BGC_FP64_Matrix3x2* matrix, BGC_FP64_Matrix2x3* transposed)
|
||||
inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* transposed, const BGC_FP64_Matrix3x2* matrix)
|
||||
{
|
||||
transposed->r1c1 = matrix->r1c1;
|
||||
transposed->r1c2 = matrix->r2c1;
|
||||
|
|
@ -173,21 +173,21 @@ inline void bgc_fp64_matrix2x3_get_transposed(const BGC_FP64_Matrix3x2* matrix,
|
|||
|
||||
// ================== Get Row =================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_get_row(const int number, const BGC_FP32_Matrix2x3* matrix, BGC_FP32_Vector2* row)
|
||||
inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* row, const BGC_FP32_Matrix2x3* matrix, const int row_number)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (row_number == 1) {
|
||||
row->x1 = matrix->r1c1;
|
||||
row->x2 = matrix->r1c2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (row_number == 2) {
|
||||
row->x1 = matrix->r2c1;
|
||||
row->x2 = matrix->r2c2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 3) {
|
||||
if (row_number == 3) {
|
||||
row->x1 = matrix->r3c1;
|
||||
row->x2 = matrix->r3c2;
|
||||
return;
|
||||
|
|
@ -197,21 +197,21 @@ inline void bgc_fp32_matrix2x3_get_row(const int number, const BGC_FP32_Matrix2x
|
|||
row->x2 = 0.0f;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_get_row(const int number, const BGC_FP64_Matrix2x3* matrix, BGC_FP64_Vector2* row)
|
||||
inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* row, const BGC_FP64_Matrix2x3* matrix, const int row_number)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (row_number == 1) {
|
||||
row->x1 = matrix->r1c1;
|
||||
row->x2 = matrix->r1c2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (row_number == 2) {
|
||||
row->x1 = matrix->r2c1;
|
||||
row->x2 = matrix->r2c2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 3) {
|
||||
if (row_number == 3) {
|
||||
row->x1 = matrix->r3c1;
|
||||
row->x2 = matrix->r3c2;
|
||||
return;
|
||||
|
|
@ -223,41 +223,41 @@ inline void bgc_fp64_matrix2x3_get_row(const int number, const BGC_FP64_Matrix2x
|
|||
|
||||
// ================== Set Row =================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_set_row(const int number, const BGC_FP32_Vector2* row, BGC_FP32_Matrix2x3* matrix)
|
||||
inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* matrix, const int row_number, const BGC_FP32_Vector2* row)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (row_number == 1) {
|
||||
matrix->r1c1 = row->x1;
|
||||
matrix->r1c2 = row->x2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (row_number == 2) {
|
||||
matrix->r2c1 = row->x1;
|
||||
matrix->r2c2 = row->x2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 3) {
|
||||
if (row_number == 3) {
|
||||
matrix->r3c1 = row->x1;
|
||||
matrix->r3c2 = row->x2;
|
||||
}
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_set_row(const int number, const BGC_FP64_Vector2* row, BGC_FP64_Matrix2x3* matrix)
|
||||
inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* matrix, const int row_number, const BGC_FP64_Vector2* row)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (row_number == 1) {
|
||||
matrix->r1c1 = row->x1;
|
||||
matrix->r1c2 = row->x2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (row_number == 2) {
|
||||
matrix->r2c1 = row->x1;
|
||||
matrix->r2c2 = row->x2;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 3) {
|
||||
if (row_number == 3) {
|
||||
matrix->r3c1 = row->x1;
|
||||
matrix->r3c2 = row->x2;
|
||||
}
|
||||
|
|
@ -265,32 +265,32 @@ inline void bgc_fp64_matrix2x3_set_row(const int number, const BGC_FP64_Vector2*
|
|||
|
||||
// ================= Get Column ================= //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_get_column(const int number, const BGC_FP32_Matrix2x3* matrix, BGC_FP32_Vector3* column)
|
||||
inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* column, const BGC_FP32_Matrix2x3* matrix, const int column_number)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (column_number == 1) {
|
||||
column->x1 = matrix->r1c1;
|
||||
column->x2 = matrix->r2c1;
|
||||
column->x3 = matrix->r3c1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (column_number == 2) {
|
||||
column->x1 = matrix->r1c2;
|
||||
column->x2 = matrix->r2c2;
|
||||
column->x3 = matrix->r3c2;
|
||||
}
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_get_column(const int number, const BGC_FP64_Matrix2x3* matrix, BGC_FP64_Vector3* column)
|
||||
inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* column, const BGC_FP64_Matrix2x3* matrix, const int column_number)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (column_number == 1) {
|
||||
column->x1 = matrix->r1c1;
|
||||
column->x2 = matrix->r2c1;
|
||||
column->x3 = matrix->r3c1;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (column_number == 2) {
|
||||
column->x1 = matrix->r1c2;
|
||||
column->x2 = matrix->r2c2;
|
||||
column->x3 = matrix->r3c2;
|
||||
|
|
@ -299,32 +299,32 @@ inline void bgc_fp64_matrix2x3_get_column(const int number, const BGC_FP64_Matri
|
|||
|
||||
// ================= Set Column ================= //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_set_column(const int number, const BGC_FP32_Vector3* column, BGC_FP32_Matrix2x3* matrix)
|
||||
inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* matrix, const int column_number, const BGC_FP32_Vector3* column)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (column_number == 1) {
|
||||
matrix->r1c1 = column->x1;
|
||||
matrix->r2c1 = column->x2;
|
||||
matrix->r3c1 = column->x3;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (column_number == 2) {
|
||||
matrix->r1c2 = column->x1;
|
||||
matrix->r2c2 = column->x2;
|
||||
matrix->r3c2 = column->x3;
|
||||
}
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_set_column(const int number, const BGC_FP64_Vector3* column, BGC_FP64_Matrix2x3* matrix)
|
||||
inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* matrix, const int column_number, const BGC_FP64_Vector3* column)
|
||||
{
|
||||
if (number == 1) {
|
||||
if (column_number == 1) {
|
||||
matrix->r1c1 = column->x1;
|
||||
matrix->r2c1 = column->x2;
|
||||
matrix->r3c1 = column->x3;
|
||||
return;
|
||||
}
|
||||
|
||||
if (number == 2) {
|
||||
if (column_number == 2) {
|
||||
matrix->r1c2 = column->x1;
|
||||
matrix->r2c2 = column->x2;
|
||||
matrix->r3c2 = column->x3;
|
||||
|
|
@ -333,7 +333,7 @@ inline void bgc_fp64_matrix2x3_set_column(const int number, const BGC_FP64_Vecto
|
|||
|
||||
// ==================== Add ===================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_add(const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix2x3* matrix2, BGC_FP32_Matrix2x3* sum)
|
||||
inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* matrix1, const BGC_FP32_Matrix2x3* matrix2)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
|
@ -345,7 +345,7 @@ inline void bgc_fp32_matrix2x3_add(const BGC_FP32_Matrix2x3* matrix1, const BGC_
|
|||
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_add(const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix2x3* matrix2, BGC_FP64_Matrix2x3* sum)
|
||||
inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* matrix1, const BGC_FP64_Matrix2x3* matrix2)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
|
@ -359,7 +359,7 @@ inline void bgc_fp64_matrix2x3_add(const BGC_FP64_Matrix2x3* matrix1, const BGC_
|
|||
|
||||
// ================= Add scaled ================= //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_add_scaled(const BGC_FP32_Matrix2x3* basic_matrix, const BGC_FP32_Matrix2x3* scalable_matrix, const float scale, BGC_FP32_Matrix2x3* sum)
|
||||
inline void bgc_fp32_matrix2x3_add_scaled(BGC_FP32_Matrix2x3* sum, const BGC_FP32_Matrix2x3* basic_matrix, const BGC_FP32_Matrix2x3* scalable_matrix, const float scale)
|
||||
{
|
||||
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
|
||||
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
|
||||
|
|
@ -371,7 +371,7 @@ inline void bgc_fp32_matrix2x3_add_scaled(const BGC_FP32_Matrix2x3* basic_matrix
|
|||
sum->r3c2 = basic_matrix->r3c2 + scalable_matrix->r3c2 * scale;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_add_scaled(const BGC_FP64_Matrix2x3* basic_matrix, const BGC_FP64_Matrix2x3* scalable_matrix, const double scale, BGC_FP64_Matrix2x3* sum)
|
||||
inline void bgc_fp64_matrix2x3_add_scaled(BGC_FP64_Matrix2x3* sum, const BGC_FP64_Matrix2x3* basic_matrix, const BGC_FP64_Matrix2x3* scalable_matrix, const double scale)
|
||||
{
|
||||
sum->r1c1 = basic_matrix->r1c1 + scalable_matrix->r1c1 * scale;
|
||||
sum->r1c2 = basic_matrix->r1c2 + scalable_matrix->r1c2 * scale;
|
||||
|
|
@ -385,7 +385,7 @@ inline void bgc_fp64_matrix2x3_add_scaled(const BGC_FP64_Matrix2x3* basic_matrix
|
|||
|
||||
// ================== Subtract ================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_subtract(const BGC_FP32_Matrix2x3* minuend, const BGC_FP32_Matrix2x3* subtrahend, BGC_FP32_Matrix2x3* difference)
|
||||
inline void bgc_fp32_matrix2x3_subtract(BGC_FP32_Matrix2x3* difference, const BGC_FP32_Matrix2x3* minuend, const BGC_FP32_Matrix2x3* subtrahend)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
|
@ -397,7 +397,7 @@ inline void bgc_fp32_matrix2x3_subtract(const BGC_FP32_Matrix2x3* minuend, const
|
|||
difference->r3c2 = minuend->r3c2 - subtrahend->r3c2;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_subtract(const BGC_FP64_Matrix2x3* minuend, const BGC_FP64_Matrix2x3* subtrahend, BGC_FP64_Matrix2x3* difference)
|
||||
inline void bgc_fp64_matrix2x3_subtract(BGC_FP64_Matrix2x3* difference, const BGC_FP64_Matrix2x3* minuend, const BGC_FP64_Matrix2x3* subtrahend)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
|
@ -411,7 +411,7 @@ inline void bgc_fp64_matrix2x3_subtract(const BGC_FP64_Matrix2x3* minuend, const
|
|||
|
||||
// ================== Multiply ================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_multiply(const BGC_FP32_Matrix2x3* multiplicand, const float multiplier, BGC_FP32_Matrix2x3* product)
|
||||
inline void bgc_fp32_matrix2x3_multiply(BGC_FP32_Matrix2x3* product, const BGC_FP32_Matrix2x3* multiplicand, const float multiplier)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
|
@ -423,7 +423,7 @@ inline void bgc_fp32_matrix2x3_multiply(const BGC_FP32_Matrix2x3* multiplicand,
|
|||
product->r3c2 = multiplicand->r3c2 * multiplier;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_multiply(const BGC_FP64_Matrix2x3* multiplicand, const double multiplier, BGC_FP64_Matrix2x3* product)
|
||||
inline void bgc_fp64_matrix2x3_multiply(BGC_FP64_Matrix2x3* product, const BGC_FP64_Matrix2x3* multiplicand, const double multiplier)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
|
@ -437,19 +437,19 @@ inline void bgc_fp64_matrix2x3_multiply(const BGC_FP64_Matrix2x3* multiplicand,
|
|||
|
||||
// =================== Divide =================== //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_divide(const BGC_FP32_Matrix2x3* dividend, const float divisor, BGC_FP32_Matrix2x3* quotient)
|
||||
inline void bgc_fp32_matrix2x3_divide(BGC_FP32_Matrix2x3* quotient, const BGC_FP32_Matrix2x3* dividend, const float divisor)
|
||||
{
|
||||
bgc_fp32_matrix2x3_multiply(dividend, 1.0f / divisor, quotient);
|
||||
bgc_fp32_matrix2x3_multiply(quotient, dividend, 1.0f / divisor);
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_divide(const BGC_FP64_Matrix2x3* dividend, const double divisor, BGC_FP64_Matrix2x3* quotient)
|
||||
inline void bgc_fp64_matrix2x3_divide(BGC_FP64_Matrix2x3* quotient, const BGC_FP64_Matrix2x3* dividend, const double divisor)
|
||||
{
|
||||
bgc_fp64_matrix2x3_multiply(dividend, 1.0 / divisor, quotient);
|
||||
bgc_fp64_matrix2x3_multiply(quotient, dividend, 1.0 / divisor);
|
||||
}
|
||||
|
||||
// ================ Interpolate ================= //
|
||||
|
||||
inline void bgc_fp32_matrix2x3_interpolate(const BGC_FP32_Matrix2x3* first, const BGC_FP32_Matrix2x3* second, const float phase, BGC_FP32_Matrix2x3* interpolation)
|
||||
inline void bgc_fp32_matrix2x3_interpolate(BGC_FP32_Matrix2x3* interpolation, const BGC_FP32_Matrix2x3* first, const BGC_FP32_Matrix2x3* second, const float phase)
|
||||
{
|
||||
const float couter_phase = 1.0f - phase;
|
||||
|
||||
|
|
@ -463,7 +463,7 @@ inline void bgc_fp32_matrix2x3_interpolate(const BGC_FP32_Matrix2x3* first, cons
|
|||
interpolation->r3c2 = first->r3c2 * couter_phase + second->r3c2 * phase;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_matrix2x3_interpolate(const BGC_FP64_Matrix2x3* first, const BGC_FP64_Matrix2x3* second, const double phase, BGC_FP64_Matrix2x3* interpolation)
|
||||
inline void bgc_fp64_matrix2x3_interpolate(BGC_FP64_Matrix2x3* interpolation, const BGC_FP64_Matrix2x3* first, const BGC_FP64_Matrix2x3* second, const double phase)
|
||||
{
|
||||
const double couter_phase = 1.0 - phase;
|
||||
|
||||
|
|
@ -479,13 +479,13 @@ inline void bgc_fp64_matrix2x3_interpolate(const BGC_FP64_Matrix2x3* first, cons
|
|||
|
||||
// ============ Left Vector Product ============= //
|
||||
|
||||
inline void bgc_fp32_multiply_vector3_by_matrix2x3(const BGC_FP32_Vector3* vector, const BGC_FP32_Matrix2x3* matrix, BGC_FP32_Vector2* product)
|
||||
inline void bgc_fp32_multiply_vector3_by_matrix2x3(BGC_FP32_Vector2* product, const BGC_FP32_Vector3* vector, const BGC_FP32_Matrix2x3* matrix)
|
||||
{
|
||||
product->x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1 + vector->x3 * matrix->r3c1;
|
||||
product->x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2 + vector->x3 * matrix->r3c2;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_multiply_vector3_by_matrix2x3(const BGC_FP64_Vector3* vector, const BGC_FP64_Matrix2x3* matrix, BGC_FP64_Vector2* product)
|
||||
inline void bgc_fp64_multiply_vector3_by_matrix2x3(BGC_FP64_Vector2* product, const BGC_FP64_Vector3* vector, const BGC_FP64_Matrix2x3* matrix)
|
||||
{
|
||||
product->x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1 + vector->x3 * matrix->r3c1;
|
||||
product->x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2 + vector->x3 * matrix->r3c2;
|
||||
|
|
@ -493,14 +493,14 @@ inline void bgc_fp64_multiply_vector3_by_matrix2x3(const BGC_FP64_Vector3* vecto
|
|||
|
||||
// ============ Right Vector Product ============ //
|
||||
|
||||
inline void bgc_fp32_multiply_matrix2x3_by_vector2(const BGC_FP32_Matrix2x3* matrix, const BGC_FP32_Vector2* vector, BGC_FP32_Vector3* product)
|
||||
inline void bgc_fp32_multiply_matrix2x3_by_vector2(BGC_FP32_Vector3* product, const BGC_FP32_Matrix2x3* matrix, const BGC_FP32_Vector2* vector)
|
||||
{
|
||||
product->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
|
||||
product->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
|
||||
product->x3 = matrix->r3c1 * vector->x1 + matrix->r3c2 * vector->x2;
|
||||
}
|
||||
|
||||
inline void bgc_fp64_multiply_matrix2x3_by_vector2(const BGC_FP64_Matrix2x3* matrix, const BGC_FP64_Vector2* vector, BGC_FP64_Vector3* product)
|
||||
inline void bgc_fp64_multiply_matrix2x3_by_vector2(BGC_FP64_Vector3* product, const BGC_FP64_Matrix2x3* matrix, const BGC_FP64_Vector2* vector)
|
||||
{
|
||||
product->x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
|
||||
product->x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue