Продолжение переименования
This commit is contained in:
parent
3b6efaafa9
commit
120e651517
19 changed files with 457 additions and 421 deletions
|
|
@ -121,7 +121,7 @@ inline void matrix2x3_swap_fp64(matrix2x3_fp64_t* matrix1, matrix2x3_fp64_t* mat
|
|||
|
||||
// ============= Copy to twin type ============== //
|
||||
|
||||
inline void matrix2x3_fp32_set_from_fp64(const matrix2x3_fp64_t* from, matrix2x3_fp32_t* to)
|
||||
inline void matrix2x3_convert_fp64_to_fp32(const matrix2x3_fp64_t* from, matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r1c2;
|
||||
|
|
@ -133,7 +133,7 @@ inline void matrix2x3_fp32_set_from_fp64(const matrix2x3_fp64_t* from, matrix2x3
|
|||
to->r3c2 = (float) from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_from_fp32(const matrix2x3_fp32_t* from, matrix2x3_fp64_t* to)
|
||||
inline void matrix2x3_convert_fp32_to_fp64(const matrix2x3_fp32_t* from, matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
|
@ -147,7 +147,7 @@ inline void matrix2x3_fp64_set_from_fp32(const matrix2x3_fp32_t* from, matrix2x3
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix2x3_fp32_set_transposed(const matrix3x2_fp32_t* from, matrix2x3_fp32_t* to)
|
||||
inline void matrix2x3_set_transposed_fp32(const matrix3x2_fp32_t* from, matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
|
@ -159,7 +159,7 @@ inline void matrix2x3_fp32_set_transposed(const matrix3x2_fp32_t* from, matrix2x
|
|||
to->r3c2 = from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_transposed(const matrix3x2_fp64_t* from, matrix2x3_fp64_t* to)
|
||||
inline void matrix2x3_set_transposed_fp64(const matrix3x2_fp64_t* from, matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
|
@ -173,7 +173,7 @@ inline void matrix2x3_fp64_set_transposed(const matrix3x2_fp64_t* from, matrix2x
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix2x3_fp32_set_transposed_fp64(const matrix3x2_fp64_t* from, matrix2x3_fp32_t* to)
|
||||
inline void matrix2x3_set_transposed_fp32_fp64(const matrix3x2_fp64_t* from, matrix2x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r2c1;
|
||||
|
|
@ -185,7 +185,7 @@ inline void matrix2x3_fp32_set_transposed_fp64(const matrix3x2_fp64_t* from, mat
|
|||
to->r3c2 = (float) from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_transposed_fp32(const matrix3x2_fp32_t* from, matrix2x3_fp64_t* to)
|
||||
inline void matrix2x3_set_transposed_fp64_fp32(const matrix3x2_fp32_t* from, matrix2x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
|
@ -199,13 +199,13 @@ inline void matrix2x3_fp64_set_transposed_fp32(const matrix3x2_fp32_t* from, mat
|
|||
|
||||
// ================= Set Row 1 ================== //
|
||||
|
||||
inline void matrix2x3_fp32_set_row1(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
inline void matrix2x3_set_row1_fp32(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_row1(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
inline void matrix2x3_set_row1_fp64(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
|
|
@ -213,13 +213,13 @@ inline void matrix2x3_fp64_set_row1(const double c1, const double c2, matrix2x3_
|
|||
|
||||
// ================= Set Row 2 ================== //
|
||||
|
||||
inline void matrix2x3_fp32_set_row2(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
inline void matrix2x3_set_row2_fp32(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_row2(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
inline void matrix2x3_set_row2_fp64(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
|
|
@ -227,13 +227,13 @@ inline void matrix2x3_fp64_set_row2(const double c1, const double c2, matrix2x3_
|
|||
|
||||
// ================= Set Row 3 ================== //
|
||||
|
||||
inline void matrix2x3_fp32_set_row3(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
inline void matrix2x3_set_row3_fp32(const float c1, const float c2, matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r3c1 = c1;
|
||||
matrix->r3c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_row3(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
inline void matrix2x3_set_row3_fp64(const double c1, const double c2, matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r3c1 = c1;
|
||||
matrix->r3c2 = c2;
|
||||
|
|
@ -241,14 +241,14 @@ inline void matrix2x3_fp64_set_row3(const double c1, const double c2, matrix2x3_
|
|||
|
||||
// ================ Set Column 1 ================ //
|
||||
|
||||
inline void matrix2x3_fp32_set_column1(const float r1, const float r2, const float r3, matrix2x3_fp32_t* matrix)
|
||||
inline void matrix2x3_set_column1_fp32(const float r1, const float r2, const float r3, matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
matrix->r3c1 = r3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_column1(const double r1, const double r2, const double r3, matrix2x3_fp64_t* matrix)
|
||||
inline void matrix2x3_set_column1_fp64(const double r1, const double r2, const double r3, matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
|
|
@ -257,14 +257,14 @@ inline void matrix2x3_fp64_set_column1(const double r1, const double r2, const d
|
|||
|
||||
// ================ Set Column 2 ================ //
|
||||
|
||||
inline void matrix2x3_fp32_set_column2(const float r1, const float r2, const float r3, matrix2x3_fp32_t* matrix)
|
||||
inline void matrix2x3_set_column2_fp32(const float r1, const float r2, const float r3, matrix2x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
matrix->r3c2 = r3;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_set_column2(const double r1, const double r2, const double r3, matrix2x3_fp64_t* matrix)
|
||||
inline void matrix2x3_set_column2_fp64(const double r1, const double r2, const double r3, matrix2x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
|
|
@ -273,7 +273,7 @@ inline void matrix2x3_fp64_set_column2(const double r1, const double r2, const d
|
|||
|
||||
// ================ Append scaled =============== //
|
||||
|
||||
inline void matrix2x3_fp32_append_scaled(matrix2x3_fp32_t* basic_vector, const matrix2x3_fp32_t* scalable_vector, const float scale)
|
||||
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;
|
||||
|
|
@ -285,7 +285,7 @@ inline void matrix2x3_fp32_append_scaled(matrix2x3_fp32_t* basic_vector, const m
|
|||
basic_vector->r3c2 += scalable_vector->r3c2 * scale;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_append_scaled(matrix2x3_fp64_t* basic_vector, const matrix2x3_fp64_t* scalable_vector, const double 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;
|
||||
|
|
@ -299,7 +299,7 @@ inline void matrix2x3_fp64_append_scaled(matrix2x3_fp64_t* basic_vector, const m
|
|||
|
||||
// ================== Addition ================== //
|
||||
|
||||
inline void matrix2x3_fp32_add(const matrix2x3_fp32_t* matrix1, const matrix2x3_fp32_t* matrix2, matrix2x3_fp32_t* sum)
|
||||
inline void matrix2x3_add_fp32(const matrix2x3_fp32_t* matrix1, const matrix2x3_fp32_t* matrix2, matrix2x3_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
|
@ -311,7 +311,7 @@ inline void matrix2x3_fp32_add(const matrix2x3_fp32_t* matrix1, const matrix2x3_
|
|||
sum->r3c2 = matrix1->r3c2 + matrix2->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_add(const matrix2x3_fp64_t* matrix1, const matrix2x3_fp64_t* matrix2, matrix2x3_fp64_t* sum)
|
||||
inline void matrix2x3_add_fp64(const matrix2x3_fp64_t* matrix1, const matrix2x3_fp64_t* matrix2, matrix2x3_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
|
@ -325,7 +325,7 @@ inline void matrix2x3_fp64_add(const matrix2x3_fp64_t* matrix1, const matrix2x3_
|
|||
|
||||
// ================ Subtraction ================= //
|
||||
|
||||
inline void matrix2x3_fp32_subtract(const matrix2x3_fp32_t* minuend, const matrix2x3_fp32_t* subtrahend, matrix2x3_fp32_t* difference)
|
||||
inline void matrix2x3_subtract_fp32(const matrix2x3_fp32_t* minuend, const matrix2x3_fp32_t* subtrahend, matrix2x3_fp32_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
|
@ -337,7 +337,7 @@ inline void matrix2x3_fp32_subtract(const matrix2x3_fp32_t* minuend, const matri
|
|||
difference->r3c2 = minuend->r3c2 - subtrahend->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_subtract(const matrix2x3_fp64_t* minuend, const matrix2x3_fp64_t* subtrahend, matrix2x3_fp64_t* difference)
|
||||
inline void matrix2x3_subtract_fp64(const matrix2x3_fp64_t* minuend, const matrix2x3_fp64_t* subtrahend, matrix2x3_fp64_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
|
@ -351,7 +351,7 @@ inline void matrix2x3_fp64_subtract(const matrix2x3_fp64_t* minuend, const matri
|
|||
|
||||
// =============== Multiplication =============== //
|
||||
|
||||
inline void matrix2x3_fp32_multiply(const matrix2x3_fp32_t* multiplicand, const float multiplier, matrix2x3_fp32_t* product)
|
||||
inline void matrix2x3_multiply_fp32(const matrix2x3_fp32_t* multiplicand, const float multiplier, matrix2x3_fp32_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
|
@ -363,7 +363,7 @@ inline void matrix2x3_fp32_multiply(const matrix2x3_fp32_t* multiplicand, const
|
|||
product->r3c2 = multiplicand->r3c2 * multiplier;
|
||||
}
|
||||
|
||||
inline void matrix2x3_fp64_multiply(const matrix2x3_fp64_t* multiplicand, const double multiplier, matrix2x3_fp64_t* product)
|
||||
inline void matrix2x3_multiply_fp64(const matrix2x3_fp64_t* multiplicand, const double multiplier, matrix2x3_fp64_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
|
@ -377,25 +377,25 @@ inline void matrix2x3_fp64_multiply(const matrix2x3_fp64_t* multiplicand, const
|
|||
|
||||
// ================== Division ================== //
|
||||
|
||||
inline void matrix2x3_fp32_divide(const matrix2x3_fp32_t* dividend, const float divisor, matrix2x3_fp32_t* quotient)
|
||||
inline void matrix2x3_divide_fp32(const matrix2x3_fp32_t* dividend, const float divisor, matrix2x3_fp32_t* quotient)
|
||||
{
|
||||
matrix2x3_fp32_multiply(dividend, 1.0f / divisor, quotient);
|
||||
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)
|
||||
{
|
||||
matrix2x3_fp64_multiply(dividend, 1.0 / divisor, quotient);
|
||||
matrix2x3_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
}
|
||||
|
||||
// ============ Left Vector Product ============= //
|
||||
|
||||
inline void matrix2x3_fp32_left_product(const vector3_fp32_t* vector, const matrix2x3_fp32_t* matrix, vector2_fp32_t* result)
|
||||
inline void matrix2x3_left_product_fp32(const vector3_fp32_t* vector, const matrix2x3_fp32_t* matrix, 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_fp64_left_product(const vector3_fp64_t* vector, const matrix2x3_fp64_t* matrix, vector2_fp64_t* result)
|
||||
inline void matrix2x3_left_product_fp64(const vector3_fp64_t* vector, const matrix2x3_fp64_t* matrix, 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_fp64_left_product(const vector3_fp64_t* vector, const matr
|
|||
|
||||
// ============ Right Vector Product ============ //
|
||||
|
||||
inline void matrix2x3_fp32_right_product(const matrix2x3_fp32_t* matrix, const vector2_fp32_t* vector, vector3_fp32_t* result)
|
||||
inline void matrix2x3_right_product_fp32(const matrix2x3_fp32_t* matrix, const vector2_fp32_t* vector, 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_fp64_right_product(const matrix2x3_fp64_t* matrix, const vector2_fp64_t* vector, vector3_fp64_t* result)
|
||||
inline void matrix2x3_right_product_fp64(const matrix2x3_fp64_t* matrix, const vector2_fp64_t* vector, 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