V1/Toolbox.NETMF.Hardware.Port/NumericInput.cs
/// <summary>
/// Coerces the value to the specified range
/// </summary>
/// <param name="value">The proposed new value</param>
/// <returns>The coerced value, guaranteed to be within the range</returns>
Coerces the value to the specified range
Coerces the value to the specified range
private int CoerceValue(int value)
        {
            if (value < this.Minimum)
            {
                return this.Minimum;
            }
            else if (value > this.Maximum)
            {
                return this.Maximum;
            }
            else
            {
                return value;
            }
        }
private int CoerceValue ( int value ) { if ( value < this . Minimum ) { return this . Minimum ; } else if ( value > this . Maximum ) { return this . Maximum ; } else { return value ; } }
Coerces the value to the specified range
Coerces the value to the specified range
//coerce to minimum //coerce to maximum //allowed
The coerced value, guaranteed to be within the range
The coerced value guaranteed to be within the range
value
int
The proposed new value
The proposed new value