]> granicus.if.org Git - graphviz/commitdiff
neatogen _neato_set_aspect: abbreviate coordinate swapping
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Dec 2022 21:11:56 +0000 (13:11 -0800)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 3 Dec 2022 21:11:56 +0000 (13:11 -0800)
lib/neatogen/neatosplines.c

index f1904a795fe95e309e3649113ce867740fcb6f3f..f03da45be699023251ae2c3308d8be004cadf463 100644 (file)
@@ -997,9 +997,7 @@ static bool _neato_set_aspect(graph_t * g)
        }
        /* normalize */
        if (GD_flip(g)) {
-           double t = GD_bb(g).UR.x;
-           GD_bb(g).UR.x = GD_bb(g).UR.y;
-           GD_bb(g).UR.y = t;
+           GD_bb(g).UR = exch_xyf(GD_bb(g).UR);
        }
        if (GD_drawing(g)->ratio_kind == R_FILL) {
            /* fill is weird because both X and Y can stretch */