Index: Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/GeneralStabilityPointStructuresInput.cs =================================================================== diff -u -r680d50ac48c78aba5bcdb6cc459343ef6941f7a0 -r4e11185058b30d0fc525382d015112be4a2e84f8 --- Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/GeneralStabilityPointStructuresInput.cs (.../GeneralStabilityPointStructuresInput.cs) (revision 680d50ac48c78aba5bcdb6cc459343ef6941f7a0) +++ Ringtoets/StabilityPointStructures/src/Ringtoets.StabilityPointStructures.Data/GeneralStabilityPointStructuresInput.cs (.../GeneralStabilityPointStructuresInput.cs) (revision 4e11185058b30d0fc525382d015112be4a2e84f8) @@ -31,15 +31,17 @@ /// public class GeneralStabilityPointStructuresInput { - private static readonly Range validityRangeN = new Range(1.0, 20.0); + private const int numberOfDecimalPlacesN = 2; + private static readonly Range validityRangeN = new Range(new RoundedDouble(numberOfDecimalPlacesN, 1), + new RoundedDouble(numberOfDecimalPlacesN, 20)); private RoundedDouble n; /// /// Initializes a new instance of the class. /// public GeneralStabilityPointStructuresInput() { - n = new RoundedDouble(2, 3.0); + n = new RoundedDouble(numberOfDecimalPlacesN, 3.0); GravitationalAcceleration = new RoundedDouble(2, 9.81); @@ -87,7 +89,7 @@ /// Gets or sets the 'N' parameter used to factor in the 'length effect'. /// /// Thrown when the is not in - /// the interval [1, 20]. + /// the interval [1.0, 20.0]. public RoundedDouble N { get @@ -96,13 +98,14 @@ } set { - if (!validityRangeN.InRange(value)) + RoundedDouble newValue = value.ToPrecision(n.NumberOfDecimalPlaces); + if (!validityRangeN.InRange(newValue)) { throw new ArgumentOutOfRangeException(nameof(value), string.Format(Resources.N_Value_should_be_in_Range_0_, validityRangeN)); } - n = value.ToPrecision(n.NumberOfDecimalPlaces); + n = newValue; } }