I have a Dictionary;
Dictionary<int, float> delta = new Dictionary<int, float>();
which contains:
0, 45,2345
7, 25,3556
18, 23,2334
How can i find the value of the closest, lower key to a number?
Imagine I have the number 16, id like to find the value of key 7. Same for 4, id like the value of key 0.
Preferably i'd also like the fastest way to do this, since i have to run the operation several million times.
I use C#, .NET 4.