From: Matthew Fernandez Date: Sun, 20 Nov 2022 20:11:31 +0000 (-0800) Subject: circogen setInfo: abbreviate some open coded 'fmax' X-Git-Tag: 7.0.3~2^2~7 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=38fe7a0282f4cbf560e2190502ccde371cd7231e;p=graphviz circogen setInfo: abbreviate some open coded 'fmax' --- diff --git a/lib/circogen/circpos.c b/lib/circogen/circpos.c index 1d700d2e2..828c73bc8 100644 --- a/lib/circogen/circpos.c +++ b/lib/circogen/circpos.c @@ -17,6 +17,7 @@ */ #include +#include /* getRotation: * The function determines how much the block should be rotated @@ -221,13 +222,10 @@ setInfo (posinfo_t* p0, posinfo_t* p1, double delta) t /= 2*delta*p0->minRadius*p1->minRadius; - if (t < 1) - t = 1; + t = fmax(t, 1); - if (t > p0->scale) - p0->scale = t; - if (t > p1->scale) - p1->scale = t; + p0->scale = fmax(p0->scale, t); + p1->scale = fmax(p1->scale, t); } /* positionChildren: