Продолжение переименования
This commit is contained in:
parent
3b6efaafa9
commit
120e651517
19 changed files with 457 additions and 421 deletions
|
@ -11,7 +11,7 @@
|
|||
|
||||
typedef struct {
|
||||
versor_fp32_t versor1, versor2, result;
|
||||
matrix3x3_fp32_t matrix;
|
||||
//matrix3x3_fp32_t matrix;
|
||||
vector3_fp32_t vector1, vector2;
|
||||
} structure_fp32_t;
|
||||
|
||||
|
@ -31,7 +31,7 @@ structure_fp32_t* make_structures(const unsigned int amount)
|
|||
const float multiplier = 2.0f / RAND_MAX;
|
||||
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
versor_fp32_set_values(
|
||||
versor_set_values_fp32(
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
|
@ -39,7 +39,7 @@ structure_fp32_t* make_structures(const unsigned int amount)
|
|||
&list[i].versor1
|
||||
);
|
||||
|
||||
versor_fp32_set_values(
|
||||
versor_set_values_fp32(
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
|
@ -49,9 +49,9 @@ structure_fp32_t* make_structures(const unsigned int amount)
|
|||
|
||||
versor_reset_fp32(&list[i].result);
|
||||
|
||||
matrix3x3_fp32_set_to_identity(&list[i].matrix);
|
||||
//matrix3x3_set_to_identity_fp32(&list[i].matrix);
|
||||
|
||||
vector3_set_fp32(
|
||||
vector3_set_values_fp32(
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
|
@ -86,9 +86,10 @@ void print_vector_fp64(const vector3_fp64_t* vector)
|
|||
|
||||
void item_work(structure_fp32_t* item)
|
||||
{
|
||||
versor_fp32_combine(&item->versor1, &item->versor1, &item->result);
|
||||
versor_fp32_make_rotation_matrix(&item->result, &item->matrix);
|
||||
matrix3x3_fp32_right_product(&item->matrix, &item->vector1, &item->vector2);
|
||||
for (int j = 0; j < 1000; j++) {
|
||||
versor_combine_fp32(&item->versor1, &item->versor2, &item->result);
|
||||
versor_turn_vector_fp32(&item->result, &item->vector1, &item->vector2);
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
|
@ -121,13 +122,12 @@ int main()
|
|||
#endif // _WIN64
|
||||
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
for (int j = 0; j < 1000; j++) {
|
||||
//item_work(list + i);
|
||||
versor_fp32_combine(&list[i].versor1, &list[i].versor2, &list[i].result);
|
||||
versor_fp32_make_rotation_matrix(&list[i].result, &list[i].matrix);
|
||||
matrix3x3_fp32_right_product(&list[i].matrix, &list[i].vector1, &list[i].vector2);
|
||||
//versor_fp32_turn(&list[i].result, &list[i].vector1, &list[i].vector2);
|
||||
}
|
||||
//for (int j = 0; j < 1000; j++) {
|
||||
item_work(list + i);
|
||||
//structure_fp32_t* item = list + i;
|
||||
//versor_combine_fp32(&item->versor1, &item->versor2, &item->result);
|
||||
//versor_turn_vector_fp32(&item->result, &item->vector1, &item->vector2);
|
||||
//}
|
||||
}
|
||||
|
||||
#ifdef _WIN64
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "vector2_fp32_test.h"
|
||||
#include "fp32_vector2_test.h"
|
||||
|
||||
const int TEST_FP32_VECTOR2_AMOUNT_1 = 5;
|
||||
|
||||
|
@ -31,7 +31,7 @@ int test_vector2_fp32_square_modulus()
|
|||
for (int i = 0; i < TEST_FP32_VECTOR2_AMOUNT_1; i++) {
|
||||
square_modulus = vector2_get_square_modulus_fp32(&TEST_FP32_VECTOR2_COMMON_1[i]);
|
||||
|
||||
if (!test_fp32_are_equal(square_modulus, FP32_VECTOR2_SQUARE_MODULUS_1[i], TEST_FP32_TWO_EPSYLON)) {
|
||||
if (!test_are_equal_fp32(square_modulus, FP32_VECTOR2_SQUARE_MODULUS_1[i], TEST_FP32_TWO_EPSYLON)) {
|
||||
print_test_failed();
|
||||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ int test_vector2_fp32_modulus()
|
|||
for (int i = 0; i < TEST_FP32_VECTOR2_AMOUNT_1; i++) {
|
||||
square_modulus = vector2_get_modulus_fp32(&TEST_FP32_VECTOR2_COMMON_1[i]);
|
||||
|
||||
if (!test_fp32_are_equal(square_modulus, FP32_VECTOR2_MODULUS_1[i], TEST_FP32_EPSYLON)) {
|
||||
if (!test_are_equal_fp32(square_modulus, FP32_VECTOR2_MODULUS_1[i], TEST_FP32_EPSYLON)) {
|
||||
print_test_failed();
|
||||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
@ -74,17 +74,17 @@ const vector2_fp32_t TEST_FP32_VECTOR2_COMMON_1_2_SUM[] = {
|
|||
{ -122.0f, -19.6217f }
|
||||
};
|
||||
|
||||
int test_vector2_fp32_add()
|
||||
int test_vector2_add_fp32()
|
||||
{
|
||||
print_test_name("vector2_fp32_t add");
|
||||
|
||||
vector2_fp32_t vector;
|
||||
|
||||
for (int i = 0; i < TEST_FP32_VECTOR2_AMOUNT_1; i++) {
|
||||
vector2_fp32_add(&TEST_FP32_VECTOR2_COMMON_1[i], &TEST_FP32_VECTOR2_COMMON_2[i], &vector);
|
||||
vector2_add_fp32(&TEST_FP32_VECTOR2_COMMON_1[i], &TEST_FP32_VECTOR2_COMMON_2[i], &vector);
|
||||
|
||||
if (!test_fp32_are_equal(vector.x1, TEST_FP32_VECTOR2_COMMON_1_2_SUM[i].x1, TEST_FP32_EPSYLON) ||
|
||||
!test_fp32_are_equal(vector.x2, TEST_FP32_VECTOR2_COMMON_1_2_SUM[i].x2, TEST_FP32_EPSYLON)) {
|
||||
if (!test_are_equal_fp32(vector.x1, TEST_FP32_VECTOR2_COMMON_1_2_SUM[i].x1, TEST_FP32_EPSYLON) ||
|
||||
!test_are_equal_fp32(vector.x2, TEST_FP32_VECTOR2_COMMON_1_2_SUM[i].x2, TEST_FP32_EPSYLON)) {
|
||||
print_test_failed();
|
||||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
@ -104,17 +104,17 @@ const vector2_fp32_t TEST_FP32_VECTOR2_COMMON_1_2_DIFF[] = {
|
|||
{ -125.0f, 27.0783f }
|
||||
};
|
||||
|
||||
int test_vector2_fp32_subtract()
|
||||
int test_vector2_subtract_fp32()
|
||||
{
|
||||
print_test_name("vector2_fp32_t subtract");
|
||||
|
||||
vector2_fp32_t vector;
|
||||
|
||||
for (int i = 0; i < TEST_FP32_VECTOR2_AMOUNT_1; i++) {
|
||||
vector2_fp32_subtract(&TEST_FP32_VECTOR2_COMMON_1[i], &TEST_FP32_VECTOR2_COMMON_2[i], &vector);
|
||||
vector2_subtract_fp32(&TEST_FP32_VECTOR2_COMMON_1[i], &TEST_FP32_VECTOR2_COMMON_2[i], &vector);
|
||||
|
||||
if (!test_fp32_are_equal(vector.x1, TEST_FP32_VECTOR2_COMMON_1_2_DIFF[i].x1, TEST_FP32_EPSYLON) ||
|
||||
!test_fp32_are_equal(vector.x2, TEST_FP32_VECTOR2_COMMON_1_2_DIFF[i].x2, TEST_FP32_EPSYLON)) {
|
||||
if (!test_are_equal_fp32(vector.x1, TEST_FP32_VECTOR2_COMMON_1_2_DIFF[i].x1, TEST_FP32_EPSYLON) ||
|
||||
!test_are_equal_fp32(vector.x2, TEST_FP32_VECTOR2_COMMON_1_2_DIFF[i].x2, TEST_FP32_EPSYLON)) {
|
||||
print_test_failed();
|
||||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
@ -138,11 +138,11 @@ int test_fp32_vector2()
|
|||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
||||
if (test_vector2_fp32_add() != TEST_RESULT_SUCCES) {
|
||||
if (test_vector2_add_fp32() != TEST_RESULT_SUCCES) {
|
||||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
||||
if (test_vector2_fp32_subtract() != TEST_RESULT_SUCCES) {
|
||||
if (test_vector2_subtract_fp32() != TEST_RESULT_SUCCES) {
|
||||
return TEST_RESULT_FAILED;
|
||||
}
|
||||
|
||||
|
|
|
@ -9,8 +9,8 @@ int test_vector2_fp32_square_modulus();
|
|||
|
||||
int test_vector2_fp32_modulus();
|
||||
|
||||
int test_vector2_fp32_add();
|
||||
int test_vector2_add_fp32();
|
||||
|
||||
int test_vector2_fp32_subtract();
|
||||
int test_vector2_subtract_fp32();
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,7 +22,7 @@ void print_test_success();
|
|||
|
||||
void print_test_failed();
|
||||
|
||||
inline int test_fp32_are_equal(const float value1, const float value2, const float epsylon)
|
||||
inline int test_are_equal_fp32(const float value1, const float value2, const float epsylon)
|
||||
{
|
||||
if (-1.0f <= value1 && value1 <= 1.0f) {
|
||||
const float difference = value1 - value2;
|
||||
|
@ -36,7 +36,7 @@ inline int test_fp32_are_equal(const float value1, const float value2, const flo
|
|||
return value1 * (1.0f + epsylon) <= value2 && value2 * (1.0f + epsylon) <= value1;
|
||||
}
|
||||
|
||||
inline int test_fp64_are_equal(const double value1, const double value2, const double epsylon)
|
||||
inline int test_are_equal_fp64(const double value1, const double value2, const double epsylon)
|
||||
{
|
||||
if (-1.0 <= value1 && value1 <= 1.0) {
|
||||
const double difference = value1 - value2;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
#include "geometry_test.h"
|
||||
#include "vector2_fp32_test.h"
|
||||
#include "fp32_vector2_test.h"
|
||||
|
||||
#define PROGRAM_RESULT_SUCCESS 0
|
||||
#define PROGRAM_RESULT_FAILED 1
|
||||
|
|
|
@ -25,7 +25,7 @@ inline void matrix2x2_reset_fp64(matrix2x2_fp64_t* matrix)
|
|||
|
||||
// ================== Identity ================== //
|
||||
|
||||
inline void matrix2x2_fp32_set_to_identity(matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_set_to_identity_fp32(matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 1.0f;
|
||||
matrix->r1c2 = 0.0f;
|
||||
|
@ -33,7 +33,7 @@ inline void matrix2x2_fp32_set_to_identity(matrix2x2_fp32_t* matrix)
|
|||
matrix->r2c2 = 1.0f;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_to_identity(matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_set_to_identity_fp64(matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 1.0;
|
||||
matrix->r1c2 = 0.0;
|
||||
|
@ -43,7 +43,7 @@ inline void matrix2x2_fp64_set_to_identity(matrix2x2_fp64_t* matrix)
|
|||
|
||||
// ================ Make Diagonal =============== //
|
||||
|
||||
inline void matrix2x2_fp32_set_to_diagonal(const float d1, const float d2, matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_set_to_diagonal_fp32(const float d1, const float d2, matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = d1;
|
||||
matrix->r1c2 = 0.0f;
|
||||
|
@ -51,7 +51,7 @@ inline void matrix2x2_fp32_set_to_diagonal(const float d1, const float d2, matri
|
|||
matrix->r2c2 = d2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_to_diagonal(const double d1, const double d2, matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_set_to_diagonal_fp64(const double d1, const double d2, matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = d1;
|
||||
matrix->r1c2 = 0.0;
|
||||
|
@ -61,7 +61,7 @@ inline void matrix2x2_fp64_set_to_diagonal(const double d1, const double d2, mat
|
|||
|
||||
// ============== Rotation Matrix =============== //
|
||||
|
||||
inline void matrix2x2_fp32_make_turn(const float angle, const angle_unit_t unit, matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_make_rotation_fp32(const float angle, const angle_unit_t unit, matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
const float radians = fp32_angle_to_radians(angle, unit);
|
||||
const float cosine = cosf(radians);
|
||||
|
@ -73,7 +73,7 @@ inline void matrix2x2_fp32_make_turn(const float angle, const angle_unit_t unit,
|
|||
matrix->r2c2 = cosine;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_make_turn(const double angle, const angle_unit_t unit, matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_make_rotation_fp64(const double angle, const angle_unit_t unit, matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
const double radians = fp64_angle_to_radians(angle, unit);
|
||||
const double cosine = cos(radians);
|
||||
|
@ -151,7 +151,7 @@ inline void matrix2x2_swap_fp64(matrix2x2_fp64_t* matrix1, matrix2x2_fp64_t* mat
|
|||
|
||||
// ============= Copy to twin type ============== //
|
||||
|
||||
inline void matrix2x2_fp32_set_from_fp64(const matrix2x2_fp64_t* from, matrix2x2_fp32_t* to)
|
||||
inline void matrix2x2_convert_fp64_to_fp32(const matrix2x2_fp64_t* from, matrix2x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float)from->r1c1;
|
||||
to->r1c2 = (float)from->r1c2;
|
||||
|
@ -160,7 +160,7 @@ inline void matrix2x2_fp32_set_from_fp64(const matrix2x2_fp64_t* from, matrix2x2
|
|||
to->r2c2 = (float)from->r2c2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_from_fp32(const matrix2x2_fp32_t* from, matrix2x2_fp64_t* to)
|
||||
inline void matrix2x2_convert_fp32_to_fp64(const matrix2x2_fp32_t* from, matrix2x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
@ -171,42 +171,42 @@ inline void matrix2x2_fp64_set_from_fp32(const matrix2x2_fp32_t* from, matrix2x2
|
|||
|
||||
// ================ Determinant ================= //
|
||||
|
||||
inline float matrix2x2_fp32_get_determinant(const matrix2x2_fp32_t* matrix)
|
||||
inline float matrix2x2_get_determinant_fp32(const matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
return matrix->r1c1 * matrix->r2c2 - matrix->r1c2 * matrix->r2c1;
|
||||
}
|
||||
|
||||
inline double matrix2x2_fp64_get_determinant(const matrix2x2_fp64_t* matrix)
|
||||
inline double matrix2x2_get_determinant_fp64(const matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
return matrix->r1c1 * matrix->r2c2 - matrix->r1c2 * matrix->r2c1;
|
||||
}
|
||||
|
||||
// ================== Singular ================== //
|
||||
|
||||
inline int matrix2x2_fp32_is_singular(const matrix2x2_fp32_t* matrix)
|
||||
inline int matrix2x2_is_singular_fp32(const matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
const float determinant = matrix2x2_fp32_get_determinant(matrix);
|
||||
const float determinant = matrix2x2_get_determinant_fp32(matrix);
|
||||
|
||||
return -FP32_EPSYLON <= determinant && determinant <= FP32_EPSYLON;
|
||||
}
|
||||
|
||||
inline int matrix2x2_fp64_is_singular(const matrix2x2_fp64_t* matrix)
|
||||
inline int matrix2x2_is_singular_fp64(const matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
const double determinant = matrix2x2_fp64_get_determinant(matrix);
|
||||
const double determinant = matrix2x2_get_determinant_fp64(matrix);
|
||||
|
||||
return -FP64_EPSYLON <= determinant && determinant <= FP64_EPSYLON;
|
||||
}
|
||||
|
||||
// =============== Transposition ================ //
|
||||
|
||||
inline void matrix2x2_fp32_transpose(matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_transpose_fp32(matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
const float tmp = matrix->r1c2;
|
||||
matrix->r1c2 = matrix->r2c1;
|
||||
matrix->r2c1 = tmp;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_transpose(matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_transpose_fp64(matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
const double tmp = matrix->r1c2;
|
||||
matrix->r1c2 = matrix->r2c1;
|
||||
|
@ -217,7 +217,7 @@ inline void matrix2x2_fp64_transpose(matrix2x2_fp64_t* matrix)
|
|||
|
||||
inline int matrix2x2_invert_fp32(matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
const float determinant = matrix2x2_fp32_get_determinant(matrix);
|
||||
const float determinant = matrix2x2_get_determinant_fp32(matrix);
|
||||
|
||||
if (-FP32_EPSYLON <= determinant && determinant <= FP32_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -242,7 +242,7 @@ inline int matrix2x2_invert_fp32(matrix2x2_fp32_t* matrix)
|
|||
|
||||
inline int matrix2x2_invert_fp64(matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
const double determinant = matrix2x2_fp64_get_determinant(matrix);
|
||||
const double determinant = matrix2x2_get_determinant_fp64(matrix);
|
||||
|
||||
if (-FP64_EPSYLON <= determinant && determinant <= FP64_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -267,7 +267,7 @@ inline int matrix2x2_invert_fp64(matrix2x2_fp64_t* matrix)
|
|||
|
||||
// =============== Set Transposed =============== //
|
||||
|
||||
inline void matrix2x2_fp32_set_transposed(const matrix2x2_fp32_t* from, matrix2x2_fp32_t* to)
|
||||
inline void matrix2x2_set_transposed_fp32(const matrix2x2_fp32_t* from, matrix2x2_fp32_t* to)
|
||||
{
|
||||
float tmp = from->r1c2;
|
||||
|
||||
|
@ -278,7 +278,7 @@ inline void matrix2x2_fp32_set_transposed(const matrix2x2_fp32_t* from, matrix2x
|
|||
to->r2c2 = from->r2c2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_transposed(const matrix2x2_fp64_t* from, matrix2x2_fp64_t* to)
|
||||
inline void matrix2x2_set_transposed_fp64(const matrix2x2_fp64_t* from, matrix2x2_fp64_t* to)
|
||||
{
|
||||
double tmp = from->r1c2;
|
||||
|
||||
|
@ -291,9 +291,9 @@ inline void matrix2x2_fp64_set_transposed(const matrix2x2_fp64_t* from, matrix2x
|
|||
|
||||
// ================ Set Inverted ================ //
|
||||
|
||||
inline int matrix2x2_fp32_set_inverted(const matrix2x2_fp32_t* from, matrix2x2_fp32_t* to)
|
||||
inline int matrix2x2_set_inverted_fp32(const matrix2x2_fp32_t* from, matrix2x2_fp32_t* to)
|
||||
{
|
||||
const float determinant = matrix2x2_fp32_get_determinant(from);
|
||||
const float determinant = matrix2x2_get_determinant_fp32(from);
|
||||
|
||||
if (-FP32_EPSYLON <= determinant && determinant <= FP32_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -316,9 +316,9 @@ inline int matrix2x2_fp32_set_inverted(const matrix2x2_fp32_t* from, matrix2x2_f
|
|||
return 1;
|
||||
}
|
||||
|
||||
inline int matrix2x2_fp64_set_inverted(const matrix2x2_fp64_t* from, matrix2x2_fp64_t* to)
|
||||
inline int matrix2x2_set_inverted_fp64(const matrix2x2_fp64_t* from, matrix2x2_fp64_t* to)
|
||||
{
|
||||
const double determinant = matrix2x2_fp64_get_determinant(from);
|
||||
const double determinant = matrix2x2_get_determinant_fp64(from);
|
||||
|
||||
if (-FP64_EPSYLON <= determinant && determinant <= FP64_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -343,13 +343,13 @@ inline int matrix2x2_fp64_set_inverted(const matrix2x2_fp64_t* from, matrix2x2_f
|
|||
|
||||
// ================= Set Row 1 ================== //
|
||||
|
||||
inline void matrix2x2_fp32_set_row1(const float c1, const float c2, matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_set_row1_fp32(const float c1, const float c2, matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_row1(const double c1, const double c2, matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_set_row1_fp64(const double c1, const double c2, matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
|
@ -357,13 +357,13 @@ inline void matrix2x2_fp64_set_row1(const double c1, const double c2, matrix2x2_
|
|||
|
||||
// ================= Set Row 2 ================== //
|
||||
|
||||
inline void matrix2x2_fp32_set_row2(const float c1, const float c2, matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_set_row2_fp32(const float c1, const float c2, matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_row2(const double c1, const double c2, matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_set_row2_fp64(const double c1, const double c2, matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
|
@ -371,13 +371,13 @@ inline void matrix2x2_fp64_set_row2(const double c1, const double c2, matrix2x2_
|
|||
|
||||
// ================ Set Column 1 ================ //
|
||||
|
||||
inline void matrix2x2_fp32_set_column1(const float r1, const float r2, matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_set_column1_fp32(const float r1, const float r2, matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_column1(const double r1, const double r2, matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_set_column1_fp64(const double r1, const double r2, matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
|
@ -385,13 +385,13 @@ inline void matrix2x2_fp64_set_column1(const double r1, const double r2, matrix2
|
|||
|
||||
// ================ Set Column 2 ================ //
|
||||
|
||||
inline void matrix2x2_fp32_set_column2(const float r1, const float r2, matrix2x2_fp32_t* matrix)
|
||||
inline void matrix2x2_set_column2_fp32(const float r1, const float r2, matrix2x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_set_column2(const double r1, const double r2, matrix2x2_fp64_t* matrix)
|
||||
inline void matrix2x2_set_column2_fp64(const double r1, const double r2, matrix2x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
|
@ -399,7 +399,7 @@ inline void matrix2x2_fp64_set_column2(const double r1, const double r2, matrix2
|
|||
|
||||
// ================ Append scaled =============== //
|
||||
|
||||
inline void matrix2x2_fp32_append_scaled(matrix2x2_fp32_t* basic_vector, const matrix2x2_fp32_t* scalable_vector, const float scale)
|
||||
inline void matrix2x2_add_scaled_fp32(matrix2x2_fp32_t* basic_vector, const matrix2x2_fp32_t* scalable_vector, const float scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
|
@ -408,7 +408,7 @@ inline void matrix2x2_fp32_append_scaled(matrix2x2_fp32_t* basic_vector, const m
|
|||
basic_vector->r2c2 += scalable_vector->r2c2 * scale;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_append_scaled(matrix2x2_fp64_t* basic_vector, const matrix2x2_fp64_t* scalable_vector, const double scale)
|
||||
inline void matrix2x2_add_scaled_fp64(matrix2x2_fp64_t* basic_vector, const matrix2x2_fp64_t* scalable_vector, const double scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
|
@ -419,7 +419,7 @@ inline void matrix2x2_fp64_append_scaled(matrix2x2_fp64_t* basic_vector, const m
|
|||
|
||||
// ================== Addition ================== //
|
||||
|
||||
inline void matrix2x2_fp32_add(const matrix2x2_fp32_t* matrix1, const matrix2x2_fp32_t* matrix2, matrix2x2_fp32_t* sum)
|
||||
inline void matrix2x2_add_fp32(const matrix2x2_fp32_t* matrix1, const matrix2x2_fp32_t* matrix2, matrix2x2_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -428,7 +428,7 @@ inline void matrix2x2_fp32_add(const matrix2x2_fp32_t* matrix1, const matrix2x2_
|
|||
sum->r2c2 = matrix1->r2c2 + matrix2->r2c2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_add(const matrix2x2_fp64_t* matrix1, const matrix2x2_fp64_t* matrix2, matrix2x2_fp64_t* sum)
|
||||
inline void matrix2x2_add_fp64(const matrix2x2_fp64_t* matrix1, const matrix2x2_fp64_t* matrix2, matrix2x2_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -439,7 +439,7 @@ inline void matrix2x2_fp64_add(const matrix2x2_fp64_t* matrix1, const matrix2x2_
|
|||
|
||||
// ================ Subtraction ================= //
|
||||
|
||||
inline void matrix2x2_fp32_subtract(const matrix2x2_fp32_t* minuend, const matrix2x2_fp32_t* subtrahend, matrix2x2_fp32_t* difference)
|
||||
inline void matrix2x2_subtract_fp32(const matrix2x2_fp32_t* minuend, const matrix2x2_fp32_t* subtrahend, matrix2x2_fp32_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -448,7 +448,7 @@ inline void matrix2x2_fp32_subtract(const matrix2x2_fp32_t* minuend, const matri
|
|||
difference->r2c2 = minuend->r2c2 - subtrahend->r2c2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_subtract(const matrix2x2_fp64_t* minuend, const matrix2x2_fp64_t* subtrahend, matrix2x2_fp64_t* difference)
|
||||
inline void matrix2x2_subtract_fp64(const matrix2x2_fp64_t* minuend, const matrix2x2_fp64_t* subtrahend, matrix2x2_fp64_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -459,7 +459,7 @@ inline void matrix2x2_fp64_subtract(const matrix2x2_fp64_t* minuend, const matri
|
|||
|
||||
// =============== Multiplication =============== //
|
||||
|
||||
inline void matrix2x2_fp32_multiply(const matrix2x2_fp32_t* multiplicand, const float multiplier, matrix2x2_fp32_t* product)
|
||||
inline void matrix2x2_multiply_fp32(const matrix2x2_fp32_t* multiplicand, const float multiplier, matrix2x2_fp32_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
@ -468,7 +468,7 @@ inline void matrix2x2_fp32_multiply(const matrix2x2_fp32_t* multiplicand, const
|
|||
product->r2c2 = multiplicand->r2c2 * multiplier;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_multiply(const matrix2x2_fp64_t* multiplicand, const double multiplier, matrix2x2_fp64_t* product)
|
||||
inline void matrix2x2_multiply_fp64(const matrix2x2_fp64_t* multiplicand, const double multiplier, matrix2x2_fp64_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
@ -479,19 +479,19 @@ inline void matrix2x2_fp64_multiply(const matrix2x2_fp64_t* multiplicand, const
|
|||
|
||||
// ================== Division ================== //
|
||||
|
||||
inline void matrix2x2_fp32_divide(const matrix2x2_fp32_t* dividend, const float divisor, matrix2x2_fp32_t* quotient)
|
||||
inline void matrix2x2_divide_fp32(const matrix2x2_fp32_t* dividend, const float divisor, matrix2x2_fp32_t* quotient)
|
||||
{
|
||||
matrix2x2_fp32_multiply(dividend, 1.0f / divisor, quotient);
|
||||
matrix2x2_multiply_fp32(dividend, 1.0f / divisor, quotient);
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_divide(const matrix2x2_fp64_t* dividend, const double divisor, matrix2x2_fp64_t* quotient)
|
||||
{
|
||||
matrix2x2_fp64_multiply(dividend, 1.0 / divisor, quotient);
|
||||
matrix2x2_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
}
|
||||
|
||||
// ============ Left Vector Product ============= //
|
||||
|
||||
inline void matrix2x2_fp32_left_product(const vector2_fp32_t* vector, const matrix2x2_fp32_t* matrix, vector2_fp32_t* result)
|
||||
inline void matrix2x2_left_product_fp32(const vector2_fp32_t* vector, const matrix2x2_fp32_t* matrix, vector2_fp32_t* result)
|
||||
{
|
||||
const float x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1;
|
||||
const float x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2;
|
||||
|
@ -500,7 +500,7 @@ inline void matrix2x2_fp32_left_product(const vector2_fp32_t* vector, const matr
|
|||
result->x2 = x2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_left_product(const vector2_fp64_t* vector, const matrix2x2_fp64_t* matrix, vector2_fp64_t* result)
|
||||
inline void matrix2x2_left_product_fp64(const vector2_fp64_t* vector, const matrix2x2_fp64_t* matrix, vector2_fp64_t* result)
|
||||
{
|
||||
const double x1 = vector->x1 * matrix->r1c1 + vector->x2 * matrix->r2c1;
|
||||
const double x2 = vector->x1 * matrix->r1c2 + vector->x2 * matrix->r2c2;
|
||||
|
@ -511,7 +511,7 @@ inline void matrix2x2_fp64_left_product(const vector2_fp64_t* vector, const matr
|
|||
|
||||
// ============ Right Vector Product ============ //
|
||||
|
||||
inline void matrix2x2_fp32_right_product(const matrix2x2_fp32_t* matrix, const vector2_fp32_t* vector, vector2_fp32_t* result)
|
||||
inline void matrix2x2_right_product_fp32(const matrix2x2_fp32_t* matrix, const vector2_fp32_t* vector, vector2_fp32_t* result)
|
||||
{
|
||||
const float x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
|
||||
const float x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
|
||||
|
@ -520,7 +520,7 @@ inline void matrix2x2_fp32_right_product(const matrix2x2_fp32_t* matrix, const v
|
|||
result->x2 = x2;
|
||||
}
|
||||
|
||||
inline void matrix2x2_fp64_right_product(const matrix2x2_fp64_t* matrix, const vector2_fp64_t* vector, vector2_fp64_t* result)
|
||||
inline void matrix2x2_right_product_fp64(const matrix2x2_fp64_t* matrix, const vector2_fp64_t* vector, vector2_fp64_t* result)
|
||||
{
|
||||
const double x1 = matrix->r1c1 * vector->x1 + matrix->r1c2 * vector->x2;
|
||||
const double x2 = matrix->r2c1 * vector->x1 + matrix->r2c2 * vector->x2;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -111,7 +111,7 @@ inline void matrix3x2_swap_fp64(matrix3x2_fp64_t* matrix1, matrix3x2_fp64_t* mat
|
|||
|
||||
// ============= Set from twin type ============= //
|
||||
|
||||
inline void matrix3x2_fp32_set_from_fp64(const matrix3x2_fp64_t* from, matrix3x2_fp32_t* to)
|
||||
inline void matrix3x2_convert_fp64_to_fp32(const matrix3x2_fp64_t* from, matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r1c2;
|
||||
|
@ -122,7 +122,7 @@ inline void matrix3x2_fp32_set_from_fp64(const matrix3x2_fp64_t* from, matrix3x2
|
|||
to->r2c3 = (float) from->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_from_fp32(const matrix3x2_fp32_t* from, matrix3x2_fp64_t* to)
|
||||
inline void matrix3x2_convert_fp32_to_fp64(const matrix3x2_fp32_t* from, matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
@ -135,7 +135,7 @@ inline void matrix3x2_fp64_set_from_fp32(const matrix3x2_fp32_t* from, matrix3x2
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix3x2_fp32_set_transposed(const matrix2x3_fp32_t* from, matrix3x2_fp32_t* to)
|
||||
inline void matrix3x2_set_transposed_fp32(const matrix2x3_fp32_t* from, matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
@ -146,7 +146,7 @@ inline void matrix3x2_fp32_set_transposed(const matrix2x3_fp32_t* from, matrix3x
|
|||
to->r2c3 = from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_transposed(const matrix2x3_fp64_t* from, matrix3x2_fp64_t* to)
|
||||
inline void matrix3x2_set_transposed_fp64(const matrix2x3_fp64_t* from, matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
@ -159,7 +159,7 @@ inline void matrix3x2_fp64_set_transposed(const matrix2x3_fp64_t* from, matrix3x
|
|||
|
||||
// =============== Set transposed =============== //
|
||||
|
||||
inline void matrix3x2_fp32_set_transposed_fp64(const matrix2x3_fp64_t* from, matrix3x2_fp32_t* to)
|
||||
inline void matrix3x2_set_transposed_fp32_fp64(const matrix2x3_fp64_t* from, matrix3x2_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r2c1;
|
||||
|
@ -170,7 +170,7 @@ inline void matrix3x2_fp32_set_transposed_fp64(const matrix2x3_fp64_t* from, mat
|
|||
to->r2c3 = (float) from->r3c2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_transposed_fp32(const matrix2x3_fp32_t* from, matrix3x2_fp64_t* to)
|
||||
inline void matrix3x2_set_transposed_fp64_fp32(const matrix2x3_fp32_t* from, matrix3x2_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r2c1;
|
||||
|
@ -183,14 +183,14 @@ inline void matrix3x2_fp64_set_transposed_fp32(const matrix2x3_fp32_t* from, mat
|
|||
|
||||
// ================= Set Row 1 ================== //
|
||||
|
||||
inline void matrix3x2_fp32_set_row1(const float c1, const float c2, const float c3, matrix3x2_fp32_t* matrix)
|
||||
inline void matrix3x2_set_row1_fp32(const float c1, const float c2, const float c3, matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
matrix->r1c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_row1(const double c1, const double c2, const double c3, matrix3x2_fp64_t* matrix)
|
||||
inline void matrix3x2_set_row1_fp64(const double c1, const double c2, const double c3, matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
|
@ -199,14 +199,14 @@ inline void matrix3x2_fp64_set_row1(const double c1, const double c2, const doub
|
|||
|
||||
// ================= Set Row 2 ================== //
|
||||
|
||||
inline void matrix3x2_fp32_set_row2(const float c1, const float c2, const float c3, matrix3x2_fp32_t* matrix)
|
||||
inline void matrix3x2_set_row2_fp32(const float c1, const float c2, const float c3, matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
matrix->r2c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_row2(const double c1, const double c2, const double c3, matrix3x2_fp64_t* matrix)
|
||||
inline void matrix3x2_set_row2_fp64(const double c1, const double c2, const double c3, matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
|
@ -215,13 +215,13 @@ inline void matrix3x2_fp64_set_row2(const double c1, const double c2, const doub
|
|||
|
||||
// ================ Set Column 1 ================ //
|
||||
|
||||
inline void matrix3x2_fp32_set_column1(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
inline void matrix3x2_set_column1_fp32(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_column1(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
inline void matrix3x2_set_column1_fp64(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
|
@ -229,13 +229,13 @@ inline void matrix3x2_fp64_set_column1(const double r1, const double r2, matrix3
|
|||
|
||||
// ================ Set Column 2 ================ //
|
||||
|
||||
inline void matrix3x2_fp32_set_column2(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
inline void matrix3x2_set_column2_fp32(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_column2(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
inline void matrix3x2_set_column2_fp64(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
|
@ -243,13 +243,13 @@ inline void matrix3x2_fp64_set_column2(const double r1, const double r2, matrix3
|
|||
|
||||
// ================ Set Column 3 ================ //
|
||||
|
||||
inline void matrix3x2_fp32_set_column3(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
inline void matrix3x2_set_column3_fp32(const float r1, const float r2, matrix3x2_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c3 = r1;
|
||||
matrix->r2c3 = r2;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_set_column3(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
inline void matrix3x2_set_column3_fp64(const double r1, const double r2, matrix3x2_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c3 = r1;
|
||||
matrix->r2c3 = r2;
|
||||
|
@ -257,7 +257,7 @@ inline void matrix3x2_fp64_set_column3(const double r1, const double r2, matrix3
|
|||
|
||||
// ================ Append scaled =============== //
|
||||
|
||||
inline void matrix3x2_fp32_append_scaled(matrix3x2_fp32_t* basic_vector, const matrix3x2_fp32_t* scalable_vector, const float scale)
|
||||
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;
|
||||
|
@ -268,7 +268,7 @@ inline void matrix3x2_fp32_append_scaled(matrix3x2_fp32_t* basic_vector, const m
|
|||
basic_vector->r2c3 += scalable_vector->r2c3 * scale;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_append_scaled(matrix3x2_fp64_t* basic_vector, const matrix3x2_fp64_t* scalable_vector, const double 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;
|
||||
|
@ -281,7 +281,7 @@ inline void matrix3x2_fp64_append_scaled(matrix3x2_fp64_t* basic_vector, const m
|
|||
|
||||
// ================== Addition ================== //
|
||||
|
||||
inline void matrix3x2_fp32_add(const matrix3x2_fp32_t* matrix1, const matrix3x2_fp32_t* matrix2, matrix3x2_fp32_t* sum)
|
||||
inline void matrix3x2_add_fp32(const matrix3x2_fp32_t* matrix1, const matrix3x2_fp32_t* matrix2, matrix3x2_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -292,7 +292,7 @@ inline void matrix3x2_fp32_add(const matrix3x2_fp32_t* matrix1, const matrix3x2_
|
|||
sum->r2c3 = matrix1->r2c3 + matrix2->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_add(const matrix3x2_fp64_t* matrix1, const matrix3x2_fp64_t* matrix2, matrix3x2_fp64_t* sum)
|
||||
inline void matrix3x2_add_fp64(const matrix3x2_fp64_t* matrix1, const matrix3x2_fp64_t* matrix2, matrix3x2_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -305,7 +305,7 @@ inline void matrix3x2_fp64_add(const matrix3x2_fp64_t* matrix1, const matrix3x2_
|
|||
|
||||
// ================ Subtraction ================= //
|
||||
|
||||
inline void matrix3x2_fp32_subtract(const matrix3x2_fp32_t* minuend, const matrix3x2_fp32_t* subtrahend, matrix3x2_fp32_t* difference)
|
||||
inline void matrix3x2_subtract_fp32(const matrix3x2_fp32_t* minuend, const matrix3x2_fp32_t* subtrahend, matrix3x2_fp32_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -316,7 +316,7 @@ inline void matrix3x2_fp32_subtract(const matrix3x2_fp32_t* minuend, const matri
|
|||
difference->r2c3 = minuend->r2c3 - subtrahend->r2c3;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_subtract(const matrix3x2_fp64_t* minuend, const matrix3x2_fp64_t* subtrahend, matrix3x2_fp64_t* difference)
|
||||
inline void matrix3x2_subtract_fp64(const matrix3x2_fp64_t* minuend, const matrix3x2_fp64_t* subtrahend, matrix3x2_fp64_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -329,7 +329,7 @@ inline void matrix3x2_fp64_subtract(const matrix3x2_fp64_t* minuend, const matri
|
|||
|
||||
// =============== Multiplication =============== //
|
||||
|
||||
inline void matrix3x2_fp32_multiply(const matrix3x2_fp32_t* multiplicand, const float multiplier, matrix3x2_fp32_t* product)
|
||||
inline void matrix3x2_multiply_fp32(const matrix3x2_fp32_t* multiplicand, const float multiplier, matrix3x2_fp32_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
@ -340,7 +340,7 @@ inline void matrix3x2_fp32_multiply(const matrix3x2_fp32_t* multiplicand, const
|
|||
product->r2c3 = multiplicand->r2c3 * multiplier;
|
||||
}
|
||||
|
||||
inline void matrix3x2_fp64_multiply(const matrix3x2_fp64_t* multiplicand, const double multiplier, matrix3x2_fp64_t* product)
|
||||
inline void matrix3x2_multiply_fp64(const matrix3x2_fp64_t* multiplicand, const double multiplier, matrix3x2_fp64_t* product)
|
||||
{
|
||||
product->r1c1 = multiplicand->r1c1 * multiplier;
|
||||
product->r1c2 = multiplicand->r1c2 * multiplier;
|
||||
|
@ -353,26 +353,26 @@ inline void matrix3x2_fp64_multiply(const matrix3x2_fp64_t* multiplicand, const
|
|||
|
||||
// ================== Division ================== //
|
||||
|
||||
inline void matrix3x2_fp32_divide(const matrix3x2_fp32_t* dividend, const float divisor, matrix3x2_fp32_t* quotient)
|
||||
inline void matrix3x2_divide_fp32(const matrix3x2_fp32_t* dividend, const float divisor, matrix3x2_fp32_t* quotient)
|
||||
{
|
||||
matrix3x2_fp32_multiply(dividend, 1.0f / divisor, quotient);
|
||||
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)
|
||||
{
|
||||
matrix3x2_fp64_multiply(dividend, 1.0 / divisor, quotient);
|
||||
matrix3x2_multiply_fp64(dividend, 1.0 / divisor, quotient);
|
||||
}
|
||||
|
||||
// ============ Left Vector Product ============= //
|
||||
|
||||
inline void matrix3x2_fp32_left_product(const vector2_fp32_t* vector, const matrix3x2_fp32_t* matrix, vector3_fp32_t* result)
|
||||
inline void matrix3x2_left_product_fp32(const vector2_fp32_t* vector, const matrix3x2_fp32_t* matrix, 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_fp64_left_product(const vector2_fp64_t* vector, const matrix3x2_fp64_t* matrix, vector3_fp64_t* result)
|
||||
inline void matrix3x2_left_product_fp64(const vector2_fp64_t* vector, const matrix3x2_fp64_t* matrix, 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_fp64_left_product(const vector2_fp64_t* vector, const matr
|
|||
|
||||
// ============ Right Vector Product ============ //
|
||||
|
||||
inline void matrix3x2_fp32_right_product(const matrix3x2_fp32_t* matrix, const vector3_fp32_t* vector, vector2_fp32_t* result)
|
||||
inline void matrix3x2_right_product_fp32(const matrix3x2_fp32_t* matrix, const vector3_fp32_t* vector, 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_fp64_right_product(const matrix3x2_fp64_t* matrix, const vector3_fp64_t* vector, vector2_fp64_t* result)
|
||||
inline void matrix3x2_right_product_fp64(const matrix3x2_fp64_t* matrix, const vector3_fp64_t* vector, 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;
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
int matrix3x3_invert_fp32(matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
const float determinant = matrix3x3_fp32_get_determinant(matrix);
|
||||
const float determinant = matrix3x3_get_determinant_fp32(matrix);
|
||||
|
||||
if (-FP32_EPSYLON <= determinant && determinant <= FP32_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -41,7 +41,7 @@ int matrix3x3_invert_fp32(matrix3x3_fp32_t* matrix)
|
|||
|
||||
int matrix3x3_invert_fp64(matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
const double determinant = matrix3x3_fp64_get_determinant(matrix);
|
||||
const double determinant = matrix3x3_get_determinant_fp64(matrix);
|
||||
|
||||
if (-FP64_EPSYLON <= determinant && determinant <= FP64_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -78,9 +78,9 @@ int matrix3x3_invert_fp64(matrix3x3_fp64_t* matrix)
|
|||
|
||||
// ================ Make Inverted =============== //
|
||||
|
||||
int matrix3x3_fp32_set_inverted(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t* result)
|
||||
int matrix3x3_set_inverted_fp32(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t* result)
|
||||
{
|
||||
const float determinant = matrix3x3_fp32_get_determinant(matrix);
|
||||
const float determinant = matrix3x3_get_determinant_fp32(matrix);
|
||||
|
||||
if (-FP32_EPSYLON <= determinant && determinant <= FP32_EPSYLON) {
|
||||
return 0;
|
||||
|
@ -115,9 +115,9 @@ int matrix3x3_fp32_set_inverted(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t
|
|||
return 1;
|
||||
}
|
||||
|
||||
int matrix3x3_fp64_set_inverted(const matrix3x3_fp64_t* matrix, matrix3x3_fp64_t* result)
|
||||
int matrix3x3_set_inverted_fp64(const matrix3x3_fp64_t* matrix, matrix3x3_fp64_t* result)
|
||||
{
|
||||
const double determinant = matrix3x3_fp64_get_determinant(matrix);
|
||||
const double determinant = matrix3x3_get_determinant_fp64(matrix);
|
||||
|
||||
if (-FP64_EPSYLON <= determinant && determinant <= FP64_EPSYLON) {
|
||||
return 0;
|
||||
|
|
|
@ -38,7 +38,7 @@ inline void matrix3x3_reset_fp64(matrix3x3_fp64_t* matrix)
|
|||
|
||||
// ================== Identity ================== //
|
||||
|
||||
inline void matrix3x3_fp32_set_to_identity(matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_to_identity_fp32(matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 1.0f;
|
||||
matrix->r1c2 = 0.0f;
|
||||
|
@ -53,7 +53,7 @@ inline void matrix3x3_fp32_set_to_identity(matrix3x3_fp32_t* matrix)
|
|||
matrix->r3c3 = 1.0f;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_to_identity(matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_to_identity_fp64(matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = 1.0;
|
||||
matrix->r1c2 = 0.0;
|
||||
|
@ -70,7 +70,7 @@ inline void matrix3x3_fp64_set_to_identity(matrix3x3_fp64_t* matrix)
|
|||
|
||||
// ================ Make Diagonal =============== //
|
||||
|
||||
inline void matrix3x3_fp32_set_to_diagonal(const float d1, const float d2, const float d3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_to_diagonal_fp32(const float d1, const float d2, const float d3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = d1;
|
||||
matrix->r1c2 = 0.0f;
|
||||
|
@ -85,7 +85,7 @@ inline void matrix3x3_fp32_set_to_diagonal(const float d1, const float d2, const
|
|||
matrix->r3c3 = d2;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_to_diagonal(const double d1, const double d2, const double d3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_to_diagonal_fp64(const double d1, const double d2, const double d3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = d1;
|
||||
matrix->r1c2 = 0.0;
|
||||
|
@ -214,7 +214,7 @@ inline void matrix3x3_swap_fp64(matrix3x3_fp64_t* matrix1, matrix3x3_fp64_t* mat
|
|||
|
||||
// ============= Set from twin type ============= //
|
||||
|
||||
inline void matrix3x3_fp32_set_from_fp64(const matrix3x3_fp64_t* from, matrix3x3_fp32_t* to)
|
||||
inline void matrix3x3_convert_fp64_to_fp32(const matrix3x3_fp64_t* from, matrix3x3_fp32_t* to)
|
||||
{
|
||||
to->r1c1 = (float) from->r1c1;
|
||||
to->r1c2 = (float) from->r1c2;
|
||||
|
@ -229,7 +229,7 @@ inline void matrix3x3_fp32_set_from_fp64(const matrix3x3_fp64_t* from, matrix3x3
|
|||
to->r3c3 = (float) from->r3c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_from_fp32(const matrix3x3_fp32_t* from, matrix3x3_fp64_t* to)
|
||||
inline void matrix3x3_convert_fp32_to_fp64(const matrix3x3_fp32_t* from, matrix3x3_fp64_t* to)
|
||||
{
|
||||
to->r1c1 = from->r1c1;
|
||||
to->r1c2 = from->r1c2;
|
||||
|
@ -246,14 +246,14 @@ inline void matrix3x3_fp64_set_from_fp32(const matrix3x3_fp32_t* from, matrix3x3
|
|||
|
||||
// ================ Determinant ================= //
|
||||
|
||||
inline float matrix3x3_fp32_get_determinant(const matrix3x3_fp32_t* matrix)
|
||||
inline float matrix3x3_get_determinant_fp32(const matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
return matrix->r1c1 * (matrix->r2c2 * matrix->r3c3 - matrix->r2c3 * matrix->r3c2)
|
||||
+ matrix->r1c2 * (matrix->r2c3 * matrix->r3c1 - matrix->r2c1 * matrix->r3c3)
|
||||
+ matrix->r1c3 * (matrix->r2c1 * matrix->r3c2 - matrix->r2c2 * matrix->r3c1);
|
||||
}
|
||||
|
||||
inline double matrix3x3_fp64_get_determinant(const matrix3x3_fp64_t* matrix)
|
||||
inline double matrix3x3_get_determinant_fp64(const matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
return matrix->r1c1 * (matrix->r2c2 * matrix->r3c3 - matrix->r2c3 * matrix->r3c2)
|
||||
+ matrix->r1c2 * (matrix->r2c3 * matrix->r3c1 - matrix->r2c1 * matrix->r3c3)
|
||||
|
@ -262,16 +262,16 @@ inline double matrix3x3_fp64_get_determinant(const matrix3x3_fp64_t* matrix)
|
|||
|
||||
// ================== Singular ================== //
|
||||
|
||||
inline int matrix3x3_fp32_is_singular(const matrix3x3_fp32_t* matrix)
|
||||
inline int matrix3x3_is_singular_fp32(const matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
const float determinant = matrix3x3_fp32_get_determinant(matrix);
|
||||
const float determinant = matrix3x3_get_determinant_fp32(matrix);
|
||||
|
||||
return -FP32_EPSYLON <= determinant && determinant <= FP32_EPSYLON;
|
||||
}
|
||||
|
||||
inline int matrix3x3_fp64_is_singular(const matrix3x3_fp64_t* matrix)
|
||||
inline int matrix3x3_is_singular_fp64(const matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
const double determinant = matrix3x3_fp64_get_determinant(matrix);
|
||||
const double determinant = matrix3x3_get_determinant_fp64(matrix);
|
||||
|
||||
return -FP64_EPSYLON <= determinant && determinant <= FP64_EPSYLON;
|
||||
}
|
||||
|
@ -284,7 +284,7 @@ int matrix3x3_invert_fp64(matrix3x3_fp64_t* matrix);
|
|||
|
||||
// =============== Transposition ================ //
|
||||
|
||||
inline void matrix3x3_fp32_transpose(matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_transpose_fp32(matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
float tmp = matrix->r1c2;
|
||||
matrix->r1c2 = matrix->r2c1;
|
||||
|
@ -299,7 +299,7 @@ inline void matrix3x3_fp32_transpose(matrix3x3_fp32_t* matrix)
|
|||
matrix->r3c2 = tmp;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_transpose(matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_transpose_fp64(matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
double tmp = matrix->r1c2;
|
||||
matrix->r1c2 = matrix->r2c1;
|
||||
|
@ -316,16 +316,16 @@ inline void matrix3x3_fp64_transpose(matrix3x3_fp64_t* matrix)
|
|||
|
||||
// ================ Make Inverted =============== //
|
||||
|
||||
int matrix3x3_fp32_set_inverted(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t* result);
|
||||
int matrix3x3_set_inverted_fp32(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t* result);
|
||||
|
||||
int matrix3x3_fp64_set_inverted(const matrix3x3_fp64_t* matrix, matrix3x3_fp64_t* result);
|
||||
int matrix3x3_set_inverted_fp64(const matrix3x3_fp64_t* matrix, matrix3x3_fp64_t* result);
|
||||
|
||||
// =============== Make Transposed ============== //
|
||||
|
||||
inline void matrix3x3_fp32_set_transposed(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t* result)
|
||||
inline void matrix3x3_set_transposed_fp32(const matrix3x3_fp32_t* matrix, matrix3x3_fp32_t* result)
|
||||
{
|
||||
if (matrix == result) {
|
||||
matrix3x3_fp32_transpose(result);
|
||||
matrix3x3_transpose_fp32(result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -342,10 +342,10 @@ inline void matrix3x3_fp32_set_transposed(const matrix3x3_fp32_t* matrix, matrix
|
|||
result->r3c3 = matrix->r3c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_transposed(const matrix3x3_fp64_t* matrix, matrix3x3_fp64_t* result)
|
||||
inline void matrix3x3_set_transposed_fp64(const matrix3x3_fp64_t* matrix, matrix3x3_fp64_t* result)
|
||||
{
|
||||
if (matrix == result) {
|
||||
matrix3x3_fp64_transpose(result);
|
||||
matrix3x3_transpose_fp64(result);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -364,14 +364,14 @@ inline void matrix3x3_fp64_set_transposed(const matrix3x3_fp64_t* matrix, matrix
|
|||
|
||||
// ================= Set Row 1 ================== //
|
||||
|
||||
inline void matrix3x3_fp32_set_row1(const float c1, const float c2, const float c3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_row1_fp32(const float c1, const float c2, const float c3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
matrix->r1c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_row1(const double c1, const double c2, const double c3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_row1_fp64(const double c1, const double c2, const double c3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = c1;
|
||||
matrix->r1c2 = c2;
|
||||
|
@ -380,14 +380,14 @@ inline void matrix3x3_fp64_set_row1(const double c1, const double c2, const doub
|
|||
|
||||
// ================= Set Row 2 ================== //
|
||||
|
||||
inline void matrix3x3_fp32_set_row2(const float c1, const float c2, const float c3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_row2_fp32(const float c1, const float c2, const float c3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
matrix->r2c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_row2(const double c1, const double c2, const double c3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_row2_fp64(const double c1, const double c2, const double c3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r2c1 = c1;
|
||||
matrix->r2c2 = c2;
|
||||
|
@ -396,14 +396,14 @@ inline void matrix3x3_fp64_set_row2(const double c1, const double c2, const doub
|
|||
|
||||
// ================= Set Row 3 ================== //
|
||||
|
||||
inline void matrix3x3_fp32_set_row3(const float c1, const float c2, const float c3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_row3_fp32(const float c1, const float c2, const float c3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r3c1 = c1;
|
||||
matrix->r3c2 = c2;
|
||||
matrix->r3c3 = c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_row3(const double c1, const double c2, const double c3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_row3_fp64(const double c1, const double c2, const double c3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r3c1 = c1;
|
||||
matrix->r3c2 = c2;
|
||||
|
@ -412,14 +412,14 @@ inline void matrix3x3_fp64_set_row3(const double c1, const double c2, const doub
|
|||
|
||||
// ================ Set Column 1 ================ //
|
||||
|
||||
inline void matrix3x3_fp32_set_column1(const float r1, const float r2, const float r3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_column1_fp32(const float r1, const float r2, const float r3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
matrix->r3c1 = r3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_column1(const double r1, const double r2, const double r3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_column1_fp64(const double r1, const double r2, const double r3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c1 = r1;
|
||||
matrix->r2c1 = r2;
|
||||
|
@ -428,14 +428,14 @@ inline void matrix3x3_fp64_set_column1(const double r1, const double r2, const d
|
|||
|
||||
// ================ Set Column 2 ================ //
|
||||
|
||||
inline void matrix3x3_fp32_set_column2(const float r1, const float r2, const float r3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_column2_fp32(const float r1, const float r2, const float r3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
matrix->r3c2 = r3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_column2(const double r1, const double r2, const double r3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_column2_fp64(const double r1, const double r2, const double r3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c2 = r1;
|
||||
matrix->r2c2 = r2;
|
||||
|
@ -444,14 +444,14 @@ inline void matrix3x3_fp64_set_column2(const double r1, const double r2, const d
|
|||
|
||||
// ================ Set Column 3 ================ //
|
||||
|
||||
inline void matrix3x3_fp32_set_column3(const float r1, const float r2, const float r3, matrix3x3_fp32_t* matrix)
|
||||
inline void matrix3x3_set_column3_fp32(const float r1, const float r2, const float r3, matrix3x3_fp32_t* matrix)
|
||||
{
|
||||
matrix->r1c3 = r1;
|
||||
matrix->r2c3 = r2;
|
||||
matrix->r3c3 = r3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_set_column3(const double r1, const double r2, const double r3, matrix3x3_fp64_t* matrix)
|
||||
inline void matrix3x3_set_column3_fp64(const double r1, const double r2, const double r3, matrix3x3_fp64_t* matrix)
|
||||
{
|
||||
matrix->r1c3 = r1;
|
||||
matrix->r2c3 = r2;
|
||||
|
@ -460,7 +460,7 @@ inline void matrix3x3_fp64_set_column3(const double r1, const double r2, const d
|
|||
|
||||
// ================ Append scaled =============== //
|
||||
|
||||
inline void matrix3x3_fp32_append_scaled(matrix3x3_fp32_t* basic_vector, const matrix3x3_fp32_t* scalable_vector, const float scale)
|
||||
inline void matrix3x3_add_scaled_fp32(matrix3x3_fp32_t* basic_vector, const matrix3x3_fp32_t* scalable_vector, const float scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
|
@ -475,7 +475,7 @@ inline void matrix3x3_fp32_append_scaled(matrix3x3_fp32_t* basic_vector, const m
|
|||
basic_vector->r3c3 += scalable_vector->r3c3 * scale;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_append_scaled(matrix3x3_fp64_t* basic_vector, const matrix3x3_fp64_t* scalable_vector, const double scale)
|
||||
inline void matrix3x3_add_scaled_fp64(matrix3x3_fp64_t* basic_vector, const matrix3x3_fp64_t* scalable_vector, const double scale)
|
||||
{
|
||||
basic_vector->r1c1 += scalable_vector->r1c1 * scale;
|
||||
basic_vector->r1c2 += scalable_vector->r1c2 * scale;
|
||||
|
@ -492,7 +492,7 @@ inline void matrix3x3_fp64_append_scaled(matrix3x3_fp64_t* basic_vector, const m
|
|||
|
||||
// ================== Addition ================== //
|
||||
|
||||
inline void matrix3x3_fp32_add(const matrix3x3_fp32_t* matrix1, const matrix3x3_fp32_t* matrix2, matrix3x3_fp32_t* sum)
|
||||
inline void matrix3x3_add_fp32(const matrix3x3_fp32_t* matrix1, const matrix3x3_fp32_t* matrix2, matrix3x3_fp32_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -507,7 +507,7 @@ inline void matrix3x3_fp32_add(const matrix3x3_fp32_t* matrix1, const matrix3x3_
|
|||
sum->r3c3 = matrix1->r3c3 + matrix2->r3c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_add(const matrix3x3_fp64_t* matrix1, const matrix3x3_fp64_t* matrix2, matrix3x3_fp64_t* sum)
|
||||
inline void matrix3x3_add_fp64(const matrix3x3_fp64_t* matrix1, const matrix3x3_fp64_t* matrix2, matrix3x3_fp64_t* sum)
|
||||
{
|
||||
sum->r1c1 = matrix1->r1c1 + matrix2->r1c1;
|
||||
sum->r1c2 = matrix1->r1c2 + matrix2->r1c2;
|
||||
|
@ -524,7 +524,7 @@ inline void matrix3x3_fp64_add(const matrix3x3_fp64_t* matrix1, const matrix3x3_
|
|||
|
||||
// ================ Subtraction ================= //
|
||||
|
||||
inline void matrix3x3_fp32_subtract(const matrix3x3_fp32_t* minuend, const matrix3x3_fp32_t* subtrahend, matrix3x3_fp32_t* difference)
|
||||
inline void matrix3x3_subtract_fp32(const matrix3x3_fp32_t* minuend, const matrix3x3_fp32_t* subtrahend, matrix3x3_fp32_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -539,7 +539,7 @@ inline void matrix3x3_fp32_subtract(const matrix3x3_fp32_t* minuend, const matri
|
|||
difference->r3c3 = minuend->r3c3 - subtrahend->r3c3;
|
||||
}
|
||||
|
||||
inline void matrix3x3_fp64_subtract(const matrix3x3_fp64_t* minuend, const matrix3x3_fp64_t* subtrahend, matrix3x3_fp64_t* difference)
|
||||
inline void matrix3x3_subtract_fp64(const matrix3x3_fp64_t* minuend, const matrix3x3_fp64_t* subtrahend, matrix3x3_fp64_t* difference)
|
||||
{
|
||||
difference->r1c1 = minuend->r1c1 - subtrahend->r1c1;
|
||||
difference->r1c2 = minuend->r1c2 - subtrahend->r1c2;
|
||||
|
@ -556,7 +556,7 @@ inline void matrix3x3_fp64_subtract(const matrix3x3_fp64_t* minuend, const matri
|
|||
|
||||
// =============== Multiplication =============== //
|
||||
|
||||
inline void matrix3x3_fp32_multiply(const matrix3x3_fp32_t* multiplicand, const float multiplier, matrix3x3_fp32_t* product)
|
||||