Оптимизация под GNU C компилятор / Optimization for GNU C Compiller

This commit is contained in:
Andrey Pokidov 2024-11-26 13:20:12 +07:00
parent e4d75824f3
commit 081f794eb1
10 changed files with 671 additions and 755 deletions

View file

Internal server error - Personal Git Server: Beyond coding. We Forge.

500

Internal server error

Forgejo version: 11.0.1+gitea-1.22.0

@ -1,105 +1 @@
#include "matrix2x2.h" #include "matrix2x2.h"
// ================= Inversion ================== //
int bg_fp32_matrix2x2_invert(BgFP32Matrix2x2* matrix)
{
const float determinant = bg_fp32_matrix2x2_get_determinant(matrix);
if (-BG_FP32_EPSYLON <= determinant && determinant <= BG_FP32_EPSYLON) {
return 0;
}
const float r1c1 = matrix->r2c2;
const float r1c2 = -matrix->r1c2;
const float r2c1 = -matrix->r2c1;