how to get min x y and max x y of an array of points using fold
Thomas
thombetteridge at gmail.com
Wed May 21 03:51:56 UTC 2025
i got this working
points.fold!(
(a, b) => min(a, b.x), (a, b) => max(a, b.x),
(a, b) => min(a, b.y), (a, b) => max(a, b.y)
)(double.max, -double.max, double.max, -double.max));
More information about the Digitalmars-d-learn
mailing list