Переименование s0 -> s, x1 -> x, x2 -> y, x3 -> z, что должно упростить читаемость кода. Также обновление документации

This commit is contained in:
Andrey Pokidov 2026-03-29 22:06:01 +07:00
parent d83ab7160d
commit b8d383da33
38 changed files with 2104 additions and 2070 deletions

View file

@ -60,64 +60,64 @@ inline void bgc_fp64_matrix2x3_copy(BGC_FP64_Matrix2x3* const destination, const
// ==================== Swap ==================== //
inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* const matrix1, BGC_FP32_Matrix2x3* const matrix2)
inline void bgc_fp32_matrix2x3_swap(BGC_FP32_Matrix2x3* const matrix, BGC_FP32_Matrix2x3* const matriy)
{
const float r1c1 = matrix2->r1c1;
const float r1c2 = matrix2->r1c2;
const float r1c1 = matriy->r1c1;
const float r1c2 = matriy->r1c2;
const float r2c1 = matrix2->r2c1;
const float r2c2 = matrix2->r2c2;
const float r2c1 = matriy->r2c1;
const float r2c2 = matriy->r2c2;
const float r3c1 = matrix2->r3c1;
const float r3c2 = matrix2->r3c2;
const float r3c1 = matriy->r3c1;
const float r3c2 = matriy->r3c2;
matrix2->r1c1 = matrix1->r1c1;
matrix2->r1c2 = matrix1->r1c2;
matriy->r1c1 = matrix->r1c1;
matriy->r1c2 = matrix->r1c2;
matrix2->r2c1 = matrix1->r2c1;
matrix2->r2c2 = matrix1->r2c2;
matriy->r2c1 = matrix->r2c1;
matriy->r2c2 = matrix->r2c2;
matrix2->r3c1 = matrix1->r3c1;
matrix2->r3c2 = matrix1->r3c2;
matriy->r3c1 = matrix->r3c1;
matriy->r3c2 = matrix->r3c2;
matrix1->r1c1 = r1c1;
matrix1->r1c2 = r1c2;
matrix->r1c1 = r1c1;
matrix->r1c2 = r1c2;
matrix1->r2c1 = r2c1;
matrix1->r2c2 = r2c2;
matrix->r2c1 = r2c1;
matrix->r2c2 = r2c2;
matrix1->r3c1 = r3c1;
matrix1->r3c2 = r3c2;
matrix->r3c1 = r3c1;
matrix->r3c2 = r3c2;
}
inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* const matrix1, BGC_FP64_Matrix2x3* const matrix2)
inline void bgc_fp64_matrix2x3_swap(BGC_FP64_Matrix2x3* const matrix, BGC_FP64_Matrix2x3* const matriy)
{
const double r1c1 = matrix2->r1c1;
const double r1c2 = matrix2->r1c2;
const double r1c1 = matriy->r1c1;
const double r1c2 = matriy->r1c2;
const double r2c1 = matrix2->r2c1;
const double r2c2 = matrix2->r2c2;
const double r2c1 = matriy->r2c1;
const double r2c2 = matriy->r2c2;
const double r3c1 = matrix2->r3c1;
const double r3c2 = matrix2->r3c2;
const double r3c1 = matriy->r3c1;
const double r3c2 = matriy->r3c2;
matrix2->r1c1 = matrix1->r1c1;
matrix2->r1c2 = matrix1->r1c2;
matriy->r1c1 = matrix->r1c1;
matriy->r1c2 = matrix->r1c2;
matrix2->r2c1 = matrix1->r2c1;
matrix2->r2c2 = matrix1->r2c2;
matriy->r2c1 = matrix->r2c1;
matriy->r2c2 = matrix->r2c2;
matrix2->r3c1 = matrix1->r3c1;
matrix2->r3c2 = matrix1->r3c2;
matriy->r3c1 = matrix->r3c1;
matriy->r3c2 = matrix->r3c2;
matrix1->r1c1 = r1c1;
matrix1->r1c2 = r1c2;
matrix->r1c1 = r1c1;
matrix->r1c2 = r1c2;
matrix1->r2c1 = r2c1;
matrix1->r2c2 = r2c2;
matrix->r2c1 = r2c1;
matrix->r2c2 = r2c2;
matrix1->r3c1 = r3c1;
matrix1->r3c2 = r3c2;
matrix->r3c1 = r3c1;
matrix->r3c2 = r3c2;
}
// ================== Convert =================== //
@ -177,49 +177,49 @@ inline void bgc_fp64_matrix2x3_get_transposed(BGC_FP64_Matrix2x3* const transpos
inline void bgc_fp32_matrix2x3_get_row(BGC_FP32_Vector2* const row, const BGC_FP32_Matrix2x3* const matrix, const int row_number)
{
if (row_number == 1) {
row->x1 = matrix->r1c1;
row->x2 = matrix->r1c2;
row->x = matrix->r1c1;
row->y = matrix->r1c2;
return;
}
if (row_number == 2) {
row->x1 = matrix->r2c1;
row->x2 = matrix->r2c2;
row->x = matrix->r2c1;
row->y = matrix->r2c2;
return;
}
if (row_number == 3) {
row->x1 = matrix->r3c1;
row->x2 = matrix->r3c2;
row->x = matrix->r3c1;
row->y = matrix->r3c2;
return;
}
row->x1 = 0.0f;
row->x2 = 0.0f;
row->x = 0.0f;
row->y = 0.0f;
}
inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* const row, const BGC_FP64_Matrix2x3* const matrix, const int row_number)
{
if (row_number == 1) {
row->x1 = matrix->r1c1;
row->x2 = matrix->r1c2;
row->x = matrix->r1c1;
row->y = matrix->r1c2;
return;
}
if (row_number == 2) {
row->x1 = matrix->r2c1;
row->x2 = matrix->r2c2;
row->x = matrix->r2c1;
row->y = matrix->r2c2;
return;
}
if (row_number == 3) {
row->x1 = matrix->r3c1;
row->x2 = matrix->r3c2;
row->x = matrix->r3c1;
row->y = matrix->r3c2;
return;
}
row->x1 = 0.0f;
row->x2 = 0.0f;
row->x = 0.0f;
row->y = 0.0f;
}
// ================== Set Row =================== //
@ -227,40 +227,40 @@ inline void bgc_fp64_matrix2x3_get_row(BGC_FP64_Vector2* const row, const BGC_FP
inline void bgc_fp32_matrix2x3_set_row(BGC_FP32_Matrix2x3* const matrix, const int row_number, const BGC_FP32_Vector2* const row)
{
if (row_number == 1) {
matrix->r1c1 = row->x1;
matrix->r1c2 = row->x2;
matrix->r1c1 = row->x;
matrix->r1c2 = row->y;
return;
}
if (row_number == 2) {
matrix->r2c1 = row->x1;
matrix->r2c2 = row->x2;
matrix->r2c1 = row->x;
matrix->r2c2 = row->y;
return;
}
if (row_number == 3) {
matrix->r3c1 = row->x1;
matrix->r3c2 = row->x2;
matrix->r3c1 = row->x;
matrix->r3c2 = row->y;
}
}
inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* const matrix, const int row_number, const BGC_FP64_Vector2* const row)
{
if (row_number == 1) {
matrix->r1c1 = row->x1;
matrix->r1c2 = row->x2;
matrix->r1c1 = row->x;
matrix->r1c2 = row->y;
return;
}
if (row_number == 2) {
matrix->r2c1 = row->x1;
matrix->r2c2 = row->x2;
matrix->r2c1 = row->x;
matrix->r2c2 = row->y;
return;
}
if (row_number == 3) {
matrix->r3c1 = row->x1;
matrix->r3c2 = row->x2;
matrix->r3c1 = row->x;
matrix->r3c2 = row->y;
}
}
@ -269,32 +269,32 @@ inline void bgc_fp64_matrix2x3_set_row(BGC_FP64_Matrix2x3* const matrix, const i
inline void bgc_fp32_matrix2x3_get_column(BGC_FP32_Vector3* const column, const BGC_FP32_Matrix2x3* const matrix, const int column_number)
{
if (column_number == 1) {
column->x1 = matrix->r1c1;
column->x2 = matrix->r2c1;
column->x3 = matrix->r3c1;
column->x = matrix->r1c1;
column->y = matrix->r2c1;
column->z = matrix->r3c1;
return;
}
if (column_number == 2) {
column->x1 = matrix->r1c2;
column->x2 = matrix->r2c2;
column->x3 = matrix->r3c2;
column->x = matrix->r1c2;
column->y = matrix->r2c2;
column->z = matrix->r3c2;
}
}
inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* const column, const BGC_FP64_Matrix2x3* const matrix, const int column_number)
{
if (column_number == 1) {
column->x1 = matrix->r1c1;
column->x2 = matrix->r2c1;
column->x3 = matrix->r3c1;
column->x = matrix->r1c1;
column->y = matrix->r2c1;
column->z = matrix->r3c1;
return;
}
if (column_number == 2) {
column->x1 = matrix->r1c2;
column->x2 = matrix->r2c2;
column->x3 = matrix->r3c2;
column->x = matrix->r1c2;
column->y = matrix->r2c2;
column->z = matrix->r3c2;
}
}
@ -303,59 +303,59 @@ inline void bgc_fp64_matrix2x3_get_column(BGC_FP64_Vector3* const column, const
inline void bgc_fp32_matrix2x3_set_column(BGC_FP32_Matrix2x3* const matrix, const int column_number, const BGC_FP32_Vector3* const column)
{
if (column_number == 1) {
matrix->r1c1 = column->x1;
matrix->r2c1 = column->x2;
matrix->r3c1 = column->x3;
matrix->r1c1 = column->x;
matrix->r2c1 = column->y;
matrix->r3c1 = column->z;
return;
}
if (column_number == 2) {
matrix->r1c2 = column->x1;
matrix->r2c2 = column->x2;
matrix->r3c2 = column->x3;
matrix->r1c2 = column->x;
matrix->r2c2 = column->y;
matrix->r3c2 = column->z;
}
}
inline void bgc_fp64_matrix2x3_set_column(BGC_FP64_Matrix2x3* const matrix, const int column_number, const BGC_FP64_Vector3* const column)
{
if (column_number == 1) {
matrix->r1c1 = column->x1;
matrix->r2c1 = column->x2;
matrix->r3c1 = column->x3;
matrix->r1c1 = column->x;
matrix->r2c1 = column->y;
matrix->r3c1 = column->z;
return;
}
if (column_number == 2) {
matrix->r1c2 = column->x1;
matrix->r2c2 = column->x2;
matrix->r3c2 = column->x3;
matrix->r1c2 = column->x;
matrix->r2c2 = column->y;
matrix->r3c2 = column->z;
}
}
// ==================== Add ===================== //
inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix2x3* const matrix2)
inline void bgc_fp32_matrix2x3_add(BGC_FP32_Matrix2x3* const sum, const BGC_FP32_Matrix2x3* const matrix, const BGC_FP32_Matrix2x3* const matriy)
{
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
sum->r1c1 = matrix->r1c1 + matriy->r1c1;
sum->r1c2 = matrix->r1c2 + matriy->r1c2;
sum->r2c1 = matrix1->r2c1 + matrix2->r2c1;
sum->r2c2 = matrix1->r2c2 + matrix2->r2c2;
sum->r2c1 = matrix->r2c1 + matriy->r2c1;
sum->r2c2 = matrix->r2c2 + matriy->r2c2;
sum->r3c1 = matrix1->r3c1 + matrix2->r3c1;
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
sum->r3c1 = matrix->r3c1 + matriy->r3c1;
sum->r3c2 = matrix->r3c2 + matriy->r3c2;
}
inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix2x3* const matrix2)
inline void bgc_fp64_matrix2x3_add(BGC_FP64_Matrix2x3* const sum, const BGC_FP64_Matrix2x3* const matrix, const BGC_FP64_Matrix2x3* const matriy)
{
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
sum->r1c1 = matrix->r1c1 + matriy->r1c1;
sum->r1c2 = matrix->r1c2 + matriy->r1c2;
sum->r2c1 = matrix1->r2c1 + matrix2->r2c1;
sum->r2c2 = matrix1->r2c2 + matrix2->r2c2;
sum->r2c1 = matrix->r2c1 + matriy->r2c1;
sum->r2c2 = matrix->r2c2 + matriy->r2c2;
sum->r3c1 = matrix1->r3c1 + matrix2->r3c1;
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
sum->r3c1 = matrix->r3c1 + matriy->r3c1;
sum->r3c2 = matrix->r3c2 + matriy->r3c2;
}
// ================= Add Scaled ================= //
@ -466,31 +466,31 @@ inline void bgc_fp64_matrix2x3_multiply_by_real_number(BGC_FP64_Matrix2x3* const
inline void bgc_fp32_matrix2x3_multiply_by_vector2(BGC_FP32_Vector3* const product, const BGC_FP32_Matrix2x3* const 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;
product->x = matrix->r1c1 * vector->x + matrix->r1c2 * vector->y;
product->y = matrix->r2c1 * vector->x + matrix->r2c2 * vector->y;
product->z = matrix->r3c1 * vector->x + matrix->r3c2 * vector->y;
}
inline void bgc_fp64_matrix2x3_multiply_by_vector2(BGC_FP64_Vector3* const product, const BGC_FP64_Matrix2x3* const 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;
product->x3 = matrix->r3c1 * vector->x1 + matrix->r3c2 * vector->x2;
product->x = matrix->r1c1 * vector->x + matrix->r1c2 * vector->y;
product->y = matrix->r2c1 * vector->x + matrix->r2c2 * vector->y;
product->z = matrix->r3c1 * vector->x + matrix->r3c2 * vector->y;
}
// ========== Matrix Product 2x3 at 2x2 ========= //
// ========== Matrix Product 2z at 2y ========= //
inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* const product, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix2x2* const matrix2)
inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* const product, const BGC_FP32_Matrix2x3* const matrix, const BGC_FP32_Matrix2x2* const matriy)
{
const float r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const float r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
const float r1c1 = matrix->r1c1 * matriy->r1c1 + matrix->r1c2 * matriy->r2c1;
const float r1c2 = matrix->r1c1 * matriy->r1c2 + matrix->r1c2 * matriy->r2c2;
const float r2c1 = matrix1->r2c1 * matrix2->r1c1 + matrix1->r2c2 * matrix2->r2c1;
const float r2c2 = matrix1->r2c1 * matrix2->r1c2 + matrix1->r2c2 * matrix2->r2c2;
const float r2c1 = matrix->r2c1 * matriy->r1c1 + matrix->r2c2 * matriy->r2c1;
const float r2c2 = matrix->r2c1 * matriy->r1c2 + matrix->r2c2 * matriy->r2c2;
const float r3c1 = matrix1->r3c1 * matrix2->r1c1 + matrix1->r3c2 * matrix2->r2c1;
const float r3c2 = matrix1->r3c1 * matrix2->r1c2 + matrix1->r3c2 * matrix2->r2c2;
const float r3c1 = matrix->r3c1 * matriy->r1c1 + matrix->r3c2 * matriy->r2c1;
const float r3c2 = matrix->r3c1 * matriy->r1c2 + matrix->r3c2 * matriy->r2c2;
product->r1c1 = r1c1;
product->r1c2 = r1c2;
@ -502,16 +502,16 @@ inline void bgc_fp32_matrix2x3_multiply_by_matrix2x2(BGC_FP32_Matrix2x3* const p
product->r3c2 = r3c2;
}
inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* const product, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix2x2* const matrix2)
inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* const product, const BGC_FP64_Matrix2x3* const matrix, const BGC_FP64_Matrix2x2* const matriy)
{
const double r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
const double r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
const double r1c1 = matrix->r1c1 * matriy->r1c1 + matrix->r1c2 * matriy->r2c1;
const double r1c2 = matrix->r1c1 * matriy->r1c2 + matrix->r1c2 * matriy->r2c2;
const double r2c1 = matrix1->r2c1 * matrix2->r1c1 + matrix1->r2c2 * matrix2->r2c1;
const double r2c2 = matrix1->r2c1 * matrix2->r1c2 + matrix1->r2c2 * matrix2->r2c2;
const double r2c1 = matrix->r2c1 * matriy->r1c1 + matrix->r2c2 * matriy->r2c1;
const double r2c2 = matrix->r2c1 * matriy->r1c2 + matrix->r2c2 * matriy->r2c2;
const double r3c1 = matrix1->r3c1 * matrix2->r1c1 + matrix1->r3c2 * matrix2->r2c1;
const double r3c2 = matrix1->r3c1 * matrix2->r1c2 + matrix1->r3c2 * matrix2->r2c2;
const double r3c1 = matrix->r3c1 * matriy->r1c1 + matrix->r3c2 * matriy->r2c1;
const double r3c2 = matrix->r3c1 * matriy->r1c2 + matrix->r3c2 * matriy->r2c2;
product->r1c1 = r1c1;
product->r1c2 = r1c2;
@ -523,36 +523,36 @@ inline void bgc_fp64_matrix2x3_multiply_by_matrix2x2(BGC_FP64_Matrix2x3* const p
product->r3c2 = r3c2;
}
// ========== Matrix Product 2x3 at 3x2 ========= //
// ========== Matrix Product 2z at 3y ========= //
inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* const product, const BGC_FP32_Matrix2x3* const matrix1, const BGC_FP32_Matrix3x2* const matrix2)
inline void bgc_fp32_matrix2x3_multiply_by_matrix3x2(BGC_FP32_Matrix3x3* const product, const BGC_FP32_Matrix2x3* const matrix, const BGC_FP32_Matrix3x2* const matriy)
{
product->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
product->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
product->r1c3 = matrix1->r1c1 * matrix2->r1c3 + matrix1->r1c2 * matrix2->r2c3;
product->r1c1 = matrix->r1c1 * matriy->r1c1 + matrix->r1c2 * matriy->r2c1;
product->r1c2 = matrix->r1c1 * matriy->r1c2 + matrix->r1c2 * matriy->r2c2;
product->r1c3 = matrix->r1c1 * matriy->r1c3 + matrix->r1c2 * matriy->r2c3;
product->r2c1 = matrix1->r2c1 * matrix2->r1c1 + matrix1->r2c2 * matrix2->r2c1;
product->r2c2 = matrix1->r2c1 * matrix2->r1c2 + matrix1->r2c2 * matrix2->r2c2;
product->r2c3 = matrix1->r2c1 * matrix2->r1c3 + matrix1->r2c2 * matrix2->r2c3;
product->r2c1 = matrix->r2c1 * matriy->r1c1 + matrix->r2c2 * matriy->r2c1;
product->r2c2 = matrix->r2c1 * matriy->r1c2 + matrix->r2c2 * matriy->r2c2;
product->r2c3 = matrix->r2c1 * matriy->r1c3 + matrix->r2c2 * matriy->r2c3;
product->r3c1 = matrix1->r3c1 * matrix2->r1c1 + matrix1->r3c2 * matrix2->r2c1;
product->r3c2 = matrix1->r3c1 * matrix2->r1c2 + matrix1->r3c2 * matrix2->r2c2;
product->r3c3 = matrix1->r3c1 * matrix2->r1c3 + matrix1->r3c2 * matrix2->r2c3;
product->r3c1 = matrix->r3c1 * matriy->r1c1 + matrix->r3c2 * matriy->r2c1;
product->r3c2 = matrix->r3c1 * matriy->r1c2 + matrix->r3c2 * matriy->r2c2;
product->r3c3 = matrix->r3c1 * matriy->r1c3 + matrix->r3c2 * matriy->r2c3;
}
inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* const product, const BGC_FP64_Matrix2x3* const matrix1, const BGC_FP64_Matrix3x2* const matrix2)
inline void bgc_fp64_matrix2x3_multiply_by_matrix3x2(BGC_FP64_Matrix3x3* const product, const BGC_FP64_Matrix2x3* const matrix, const BGC_FP64_Matrix3x2* const matriy)
{
product->r1c1 = matrix1->r1c1 * matrix2->r1c1 + matrix1->r1c2 * matrix2->r2c1;
product->r1c2 = matrix1->r1c1 * matrix2->r1c2 + matrix1->r1c2 * matrix2->r2c2;
product->r1c3 = matrix1->r1c1 * matrix2->r1c3 + matrix1->r1c2 * matrix2->r2c3;
product->r1c1 = matrix->r1c1 * matriy->r1c1 + matrix->r1c2 * matriy->r2c1;
product->r1c2 = matrix->r1c1 * matriy->r1c2 + matrix->r1c2 * matriy->r2c2;
product->r1c3 = matrix->r1c1 * matriy->r1c3 + matrix->r1c2 * matriy->r2c3;
product->r2c1 = matrix1->r2c1 * matrix2->r1c1 + matrix1->r2c2 * matrix2->r2c1;
product->r2c2 = matrix1->r2c1 * matrix2->r1c2 + matrix1->r2c2 * matrix2->r2c2;
product->r2c3 = matrix1->r2c1 * matrix2->r1c3 + matrix1->r2c2 * matrix2->r2c3;
product->r2c1 = matrix->r2c1 * matriy->r1c1 + matrix->r2c2 * matriy->r2c1;
product->r2c2 = matrix->r2c1 * matriy->r1c2 + matrix->r2c2 * matriy->r2c2;
product->r2c3 = matrix->r2c1 * matriy->r1c3 + matrix->r2c2 * matriy->r2c3;
product->r3c1 = matrix1->r3c1 * matrix2->r1c1 + matrix1->r3c2 * matrix2->r2c1;
product->r3c2 = matrix1->r3c1 * matrix2->r1c2 + matrix1->r3c2 * matrix2->r2c2;
product->r3c3 = matrix1->r3c1 * matrix2->r1c3 + matrix1->r3c2 * matrix2->r2c3;
product->r3c1 = matrix->r3c1 * matriy->r1c1 + matrix->r3c2 * matriy->r2c1;
product->r3c2 = matrix->r3c1 * matriy->r1c2 + matrix->r3c2 * matriy->r2c2;
product->r3c3 = matrix->r3c1 * matriy->r1c3 + matrix->r3c2 * matriy->r2c3;
}
// =================== Divide =================== //