projects
/
graphviz
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7ecea95
)
abbreviate open coded fmax/fmin in limitBoxes
author
Matthew Fernandez
<matthew.fernandez@gmail.com>
Mon, 31 May 2021 16:20:41 +0000
(09:20 -0700)
committer
Matthew Fernandez
<matthew.fernandez@gmail.com>
Sun, 6 Jun 2021 18:06:37 +0000
(11:06 -0700)
lib/common/routespl.c
patch
|
blob
|
history
diff --git
a/lib/common/routespl.c
b/lib/common/routespl.c
index 6c6f6846b9ccff3f32eb29a72ee4f72ad98ca30f..295461d80d11ea8f80469188cde73eb9555398a8 100644
(file)
--- a/
lib/common/routespl.c
+++ b/
lib/common/routespl.c
@@
-346,10
+346,8
@@
limitBoxes (boxf* boxes, int boxn, const pointf *pps, int pn, int delta)
* or graphs/directed/records.gv fails */
#define FUDGE .0001
if (sp[0].y <= boxes[bi].UR.y+FUDGE && sp[0].y >= boxes[bi].LL.y-FUDGE) {
- if (boxes[bi].LL.x > sp[0].x)
- boxes[bi].LL.x = sp[0].x;
- if (boxes[bi].UR.x < sp[0].x)
- boxes[bi].UR.x = sp[0].x;
+ boxes[bi].LL.x = fmin(boxes[bi].LL.x, sp[0].x);
+ boxes[bi].UR.x = fmax(boxes[bi].UR.x, sp[0].x);
}
}
}