For some reason I can't figure this out right now.

I want to compare 2 numbers and find which one is closest to a third number and return it.

like

Closest(50,40,90)

40 and 90 would be compared with 50 and it would return 40 because 40 is closer to 50 than 90.