I'm wondering if there's an object that can find in an array which is the closest value in the array ro an input value.

Say I have an array/list of 1.1 , 2.2 , 3.3, then I give as the input the number "3" and the object outputs 3.3

I've done this as a patch already, but I wonder if theres any solution that's "ready made".

thanks