Commit 74618bf9 authored by Nicolas Van der Noot's avatar Nicolas Van der Noot
Browse files

print user_hardcoded with %g instead of %f

parent 76437a30
......@@ -458,7 +458,7 @@ void mbs_print_user_hardcoded(MDS_gen_strct* gen, char *fileoutH)
{
if (gen->base->gravity[i])
{
fprintf(fidH,"#define G_%d %f\n", i+1, gen->base->gravity[i]);
fprintf(fidH,"#define G_%d %g\n", i+1, gen->base->gravity[i]);
}
}
fprintf(fidH,"\n");
......@@ -472,7 +472,7 @@ void mbs_print_user_hardcoded(MDS_gen_strct* gen, char *fileoutH)
if (cur_body->mass)
{
fprintf(fidH,"#define M_%d %f\n", cur_index, cur_body->mass);
fprintf(fidH,"#define M_%d %g\n", cur_index, cur_body->mass);
}
}
fprintf(fidH,"\n");
......@@ -489,7 +489,7 @@ void mbs_print_user_hardcoded(MDS_gen_strct* gen, char *fileoutH)
{
if (cur_body->com[j])
{
fprintf(fidH,"#define L_%d_%d %f\n", j+1, cur_index, cur_body->com[j]);
fprintf(fidH,"#define L_%d_%d %g\n", j+1, cur_index, cur_body->com[j]);
}
}
}
......@@ -507,7 +507,7 @@ void mbs_print_user_hardcoded(MDS_gen_strct* gen, char *fileoutH)
{
if (cur_body->inertia[j])
{
fprintf(fidH,"#define IN_%d_%d %f\n", inertia_tab[j], cur_index, cur_body->inertia[j]);
fprintf(fidH,"#define IN_%d_%d %g\n", inertia_tab[j], cur_index, cur_body->inertia[j]);
}
}
}
......@@ -523,7 +523,7 @@ void mbs_print_user_hardcoded(MDS_gen_strct* gen, char *fileoutH)
{
if (cur_point->pt[j])
{
fprintf(fidH,"#define DPT_%d_%d %f\n", j+1, i+1, cur_point->pt[j]);
fprintf(fidH,"#define DPT_%d_%d %g\n", j+1, i+1, cur_point->pt[j]);
}
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment