Limits a number between two other numbers.
Respects from being larger than to.
public static int Clamp( int value, int from, int to )