1 #include "param_util.h"
3 void Param_Vertex_Common_Denominator(Param_Vertices
*V
)
9 assert(V
->Vertex
->NbRows
> 0);
10 dim
= V
->Vertex
->NbColumns
-2;
14 value_assign(lcm
, V
->Vertex
->p
[0][dim
+1]);
15 for (i
= 1; i
< V
->Vertex
->NbRows
; ++i
)
16 value_lcm(V
->Vertex
->p
[i
][dim
+1], lcm
, &lcm
);
18 for (i
= 0; i
< V
->Vertex
->NbRows
; ++i
) {
19 if (value_eq(V
->Vertex
->p
[i
][dim
+1], lcm
))
21 value_division(V
->Vertex
->p
[i
][dim
+1], lcm
, V
->Vertex
->p
[i
][dim
+1]);
22 Vector_Scale(V
->Vertex
->p
[i
], V
->Vertex
->p
[i
],
23 V
->Vertex
->p
[i
][dim
+1], dim
+1);
24 value_assign(V
->Vertex
->p
[i
][dim
+1], lcm
);