From: Matthew Fernandez Date: Tue, 15 Feb 2022 08:31:45 +0000 (+1100) Subject: neatogen max_abs: replace open coded max with a call to 'fmax' X-Git-Tag: 3.0.0~26^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b617951daf1ed70ca8b6c9fe5f11d3213c768645;p=graphviz neatogen max_abs: replace open coded max with a call to 'fmax' --- diff --git a/lib/neatogen/matrix_ops.c b/lib/neatogen/matrix_ops.c index 60db51d95..fca595e87 100644 --- a/lib/neatogen/matrix_ops.c +++ b/lib/neatogen/matrix_ops.c @@ -424,8 +424,7 @@ double max_abs(int n, double *vector) double max_val = -1e50; int i; for (i = 0; i < n; i++) - if (fabs(vector[i]) > max_val) - max_val = fabs(vector[i]); + max_val = fmax(max_val, fabs(vector[i])); return max_val; }