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