The snippet below will work, using standard LINQ:
var nearestBelow = newValue - array.Where(n => n <= newValue)
.Min(n => newValue - n);
solved C# Nearest Low Value in array [closed]
The snippet below will work, using standard LINQ:
var nearestBelow = newValue - array.Where(n => n <= newValue)
.Min(n => newValue - n);
solved C# Nearest Low Value in array [closed]