Переименование типов на на общепринятый формат, отказ от суффикса _t, так как он зарезервирован POSIX
This commit is contained in:
parent
3805354611
commit
0027924f86
26 changed files with 574 additions and 571 deletions
|
|
@ -10,9 +10,9 @@
|
|||
#endif // _WINDOWS_
|
||||
|
||||
typedef struct {
|
||||
bgc_versor_fp32_t versor1, versor2, result;
|
||||
//matrix3x3_fp32_t matrix;
|
||||
bgc_vector3_fp32_t vector1, vector2;
|
||||
BgcVersorFP32 versor1, versor2, result;
|
||||
//BgcMatrix3x3FP32 matrix;
|
||||
BgcVector3FP32 vector1, vector2;
|
||||
} structure_fp32_t;
|
||||
|
||||
structure_fp32_t* allocate_structures(const unsigned int amount)
|
||||
|
|
@ -49,7 +49,7 @@ structure_fp32_t* make_structures(const unsigned int amount)
|
|||
|
||||
bgc_versor_reset_fp32(&list[i].result);
|
||||
|
||||
//matrix3x3_set_to_identity_fp32(&list[i].matrix);
|
||||
//bgc_matrix3x3_set_to_identity_fp32(&list[i].matrix);
|
||||
|
||||
bgc_vector3_set_values_fp32(
|
||||
rand() * multiplier - 1.0f,
|
||||
|
|
@ -64,32 +64,32 @@ structure_fp32_t* make_structures(const unsigned int amount)
|
|||
return list;
|
||||
}
|
||||
|
||||
void print_versor_fp32(const bgc_versor_fp32_t* versor)
|
||||
void print_versor_fp32(const BgcVersorFP32* versor)
|
||||
{
|
||||
printf("Versor (%f, %f, %f, %f)\n", versor->s0, versor->x1, versor->x2, versor->x3);
|
||||
}
|
||||
|
||||
void print_versor_fp64(const bgc_versor_fp64_t* versor)
|
||||
void print_versor_fp64(const BgcVersorFP64* versor)
|
||||
{
|
||||
printf("Versor (%lf, %lf, %lf, %lf)\n", versor->s0, versor->x1, versor->x2, versor->x3);
|
||||
}
|
||||
|
||||
void print_vector_fp32(const bgc_vector3_fp32_t* vector)
|
||||
void print_vector_fp32(const BgcVector3FP32* vector)
|
||||
{
|
||||
printf("(%f, %f, %f) / %f\n", vector->x1, vector->x2, vector->x3, bgc_vector3_get_modulus_fp32(vector));
|
||||
}
|
||||
|
||||
void print_vector_fp64(const bgc_vector3_fp64_t* vector)
|
||||
void print_vector_fp64(const BgcVector3FP64* vector)
|
||||
{
|
||||
printf("(%lf, %lf, %lf) / %lf\n", vector->x1, vector->x2, vector->x3, bgc_vector3_get_modulus_fp64(vector));
|
||||
}
|
||||
|
||||
void item_work(structure_fp32_t* item)
|
||||
{
|
||||
//for (int j = 0; j < 1000; j++) {
|
||||
for (unsigned int j = 0; j < 1000; j++) {
|
||||
bgc_versor_combine_fp32(&item->versor1, &item->versor2, &item->result);
|
||||
bgc_versor_turn_vector_fp32(&item->result, &item->vector1, &item->vector2);
|
||||
//}
|
||||
//bgc_versor_turn_vector_fp32(&item->result, &item->vector1, &item->vector2);
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue