From 6d5017e662426d7390b96ed7d216e79d3daf1f87 Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 29 Aug 2021 17:28:41 -0700 Subject: [PATCH] expandBB: rephrase open coding to fmax, fmin --- lib/common/emit.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/lib/common/emit.c b/lib/common/emit.c index 48e920442..4c513f407 100644 --- a/lib/common/emit.c +++ b/lib/common/emit.c @@ -2874,14 +2874,10 @@ static char adjust[] = {'l', 'n', 'r'}; static void expandBB (boxf* bb, pointf p) { - if (p.x > bb->UR.x) - bb->UR.x = p.x; - if (p.x < bb->LL.x) - bb->LL.x = p.x; - if (p.y > bb->UR.y) - bb->UR.y = p.y; - if (p.y < bb->LL.y) - bb->LL.y = p.y; + bb->UR.x = fmax(bb->UR.x, p.x); + bb->LL.x = fmin(bb->LL.x, p.x); + bb->UR.y = fmax(bb->UR.y, p.y); + bb->LL.y = fmin(bb->LL.y, p.y); } static boxf -- 2.49.0