float variable = Mathf.Clamp(OriginalValue, Min, Max); // Clamp Originalvalue between Min and Max and store it in a float variable