Большое переупорядочивание исходного кода

This commit is contained in:
Andrey Pokidov 2025-02-12 19:39:28 +07:00
parent fffe2be43b
commit 43bf030295
26 changed files with 1225 additions and 1137 deletions

View file

@ -27,10 +27,11 @@
<Option type="1" />
<Option compiler="gcc" />
<Compiler>
<Add option="-O2" />
<Add option="-O3" />
<Add directory="../basic-geometry" />
</Compiler>
<Linker>
<Add option="-O3" />
<Add option="-s" />
<Add library="basic-geometry" />
<Add library="m" />

View file

@ -1,4 +1,3 @@
/*
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
@ -12,8 +11,6 @@
typedef struct {
BgcVersorFP32 versor1, versor2, result;
//BgcMatrix3x3FP32 matrix;
//BgcVector3FP32 vector1, vector2;
} structure_fp32_t;
structure_fp32_t* allocate_structures(const unsigned int amount)
@ -49,18 +46,6 @@ structure_fp32_t* make_structures(const unsigned int amount)
);
bgc_versor_reset_fp32(&list[i].result);
//bgc_matrix3x3_set_to_identity_fp32(&list[i].matrix);
/*
bgc_vector3_set_values_fp32(
rand() * multiplier - 1.0f,
rand() * multiplier - 1.0f,
rand() * multiplier - 1.0f,
&list[i].vector1
);
bgc_vector3_reset_fp32(&list[i].vector2);
*//*
}
return list;
@ -94,7 +79,7 @@ void list_work(const uint_fast32_t amount, structure_fp32_t* list)
}
}
}
/*
int main()
{
const unsigned int amount = 1000000;
@ -136,18 +121,3 @@ int main()
return 0;
}
*/
#include <stdio.h>
#include <basic-geometry.h>
int main()
{
BgcVector3FP32 my_vector;
bgc_vector3_set_values_fp32(-2, 7, 10, &my_vector);
printf("x1 = %f, x2 = %f, x3 = %f\n", my_vector.x1, my_vector.x2, my_vector.x3);
return 0;
}

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

@ -106,13 +106,13 @@ static const float _TEST_FP32_DATA_SQUARE_NONUNIT[] = {
1.0f - 2.25f * BGC_EPSYLON_FP32
};
int test_is_sqare_value_unit_fp32()
int test_is_sqare_unit_fp32()
{
print_testing_name("bgc_is_sqare_value_unit_fp32");
print_testing_name("bgc_is_sqare_unit_fp32");
// Testing unit values:
for (int i = 0; i < _TEST_FP32_DATA_SQUARE_UNIT_AMOUNT; i++) {
if (!bgc_is_sqare_value_unit_fp32(_TEST_FP32_DATA_SQUARE_UNIT[i])) {
if (!bgc_is_sqare_unit_fp32(_TEST_FP32_DATA_SQUARE_UNIT[i])) {
print_testing_failed();
return TEST_FAILED;
}
@ -120,7 +120,7 @@ int test_is_sqare_value_unit_fp32()
// Testing non-unit values:
for (int i = 0; i < _TEST_FP32_DATA_SQUARE_NONUNIT_AMOUNT; i++) {
if (bgc_is_sqare_value_unit_fp32(_TEST_FP32_DATA_SQUARE_NONUNIT[i])) {
if (bgc_is_sqare_unit_fp32(_TEST_FP32_DATA_SQUARE_NONUNIT[i])) {
print_testing_failed();
return TEST_FAILED;