Переход на парадигму Destination first в порядке параметров функий
This commit is contained in:
parent
f7e41645fe
commit
03627f4401
41 changed files with 1570 additions and 1978 deletions
|
|
@ -41,18 +41,18 @@ BGC_FP32_Affine3* _create_bgc_affine3_random_list(int affine_amount)
|
|||
|
||||
for (int i = 0; i < affine_amount; i++) {
|
||||
bgc_fp32_versor_make(
|
||||
&position.turn,
|
||||
get_random_value_fp32(),
|
||||
get_random_value_fp32(),
|
||||
get_random_value_fp32(),
|
||||
get_random_value_fp32(),
|
||||
&position.turn
|
||||
get_random_value_fp32()
|
||||
);
|
||||
|
||||
position.shift.x1 = get_random_value_fp32();
|
||||
position.shift.x2 = get_random_value_fp32();
|
||||
position.shift.x3 = get_random_value_fp32();
|
||||
|
||||
bgc_fp32_position3_get_outward_affine(&position, &affines[i]);
|
||||
bgc_fp32_position3_get_outward_affine(&affines[i], &position);
|
||||
}
|
||||
|
||||
return affines;
|
||||
|
|
@ -131,7 +131,7 @@ float test_bgc_affine3_performance(int affine_amount, int vector_per_affine)
|
|||
for (int i = 0; i < affine_amount; i++)
|
||||
{
|
||||
for (int j = 0; j < vector_per_affine; j++) {
|
||||
bgc_fp32_affine3_transform_point(&affines[i], &source_vectors[vector_index], &result_vectors[vector_index]);
|
||||
bgc_fp32_affine3_transform_point(&result_vectors[vector_index], &affines[i], &source_vectors[vector_index]);
|
||||
vector_index++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,19 +30,19 @@ structure_fp32_t* make_structures(const unsigned int amount)
|
|||
|
||||
for (unsigned int i = 0; i < amount; i++) {
|
||||
bgc_fp32_versor_make(
|
||||
&list[i].versor1,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
&list[i].versor1
|
||||
rand() * multiplier - 1.0f
|
||||
);
|
||||
|
||||
bgc_fp32_versor_make(
|
||||
&list[i].versor2,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
rand() * multiplier - 1.0f,
|
||||
&list[i].versor2
|
||||
rand() * multiplier - 1.0f
|
||||
);
|
||||
|
||||
bgc_fp32_versor_reset(&list[i].result);
|
||||
|
|
@ -157,74 +157,74 @@ void test_basis_difference_fp32()
|
|||
BGC_FP32_Versor turn;
|
||||
|
||||
// No turn
|
||||
bgc_fp32_vector3_make(1.0f, 0.0f, 0.0f, &initial_primary);
|
||||
bgc_fp32_vector3_make(0.0f, 1.0f, 0.0f, &initial_auxiliary);
|
||||
bgc_fp32_vector3_make(&initial_primary, 1.0f, 0.0f, 0.0f);
|
||||