* Thus,
* alpha = theta + M_PI/2 - phi - arcsin((l/R)*(cos phi))
*/
-static double
-getRotation(block_t * sn, Agraph_t * g, double x, double y, double theta)
-{
+static double getRotation(block_t *sn, double x, double y, double theta) {
double mindist2;
Agraph_t *subg;
Agnode_t *n, *closest_node, *neighbor;
/* positionChildren:
*/
static void
-positionChildren (Agraph_t* g, posinfo_t* pi, posstate * stp, int length, double min_dist)
+positionChildren(posinfo_t *pi, posstate *stp, int length, double min_dist)
{
block_t *child;
double childAngle, childRadius, incidentAngle;
* should return the theta value if there was a rotation else zero
*/
- rotateAngle = getRotation(child, g, deltaX, deltaY, childAngle);
+ rotateAngle = getRotation(child, deltaX, deltaY, childAngle);
applyDelta(child, deltaX, deltaY, rotateAngle);
if (length == 1) {
* Finally, positionChildren is called to do the actual positioning.
* If length is 1, keeps track of minimum and maximum child angle.
*/
-static double
-position(Agraph_t * g, int childCount, int length, nodelist_t * path,
+static double position(int childCount, int length, nodelist_t *path,
block_t * sn, double min_dist)
{
nodelistitem_t *item;
}
for (i = 0; i < num_parents; i++) {
- positionChildren (g, parents + i, &state, length, min_dist);
+ positionChildren(parents + i, &state, length, min_dist);
}
free (parents);
/* attach children */
if (childCount > 0)
- centerAngle =
- position(g, childCount, length, longest_path, sn, min_dist);
+ centerAngle = position(childCount, length, longest_path, sn, min_dist);
if ((length == 1) && (BLK_PARENT(sn))) {
sn->parent_pos = centerAngle;