Продолжение переименования
This commit is contained in:
parent
3b6efaafa9
commit
120e651517
19 changed files with 457 additions and 421 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||