Index: Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs =================================================================== diff -u -rbcaf65d1f53f270fba046eaa396d3be77bd08c0f -r1a6804681b0758a5761e39099e4b6de65f9cf4a2 --- Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision bcaf65d1f53f270fba046eaa396d3be77bd08c0f) +++ Ringtoets/HeightStructures/src/Ringtoets.HeightStructures.Data/HeightStructuresInput.cs (.../HeightStructuresInput.cs) (revision 1a6804681b0758a5761e39099e4b6de65f9cf4a2) @@ -19,6 +19,7 @@ // Stichting Deltares and remain full property of Stichting Deltares at all times. // All rights reserved. +using System; using Core.Common.Base.Data; using Ringtoets.Common.Data.Probabilistics; using Ringtoets.Common.Data.Structures; @@ -62,7 +63,12 @@ } set { - deviationWaveDirection = value.ToPrecision(deviationWaveDirection.NumberOfDecimalPlaces); + RoundedDouble newDeviationWaveDirection = value.ToPrecision(deviationWaveDirection.NumberOfDecimalPlaces); + if (!double.IsNaN(newDeviationWaveDirection) && (Math.Abs(newDeviationWaveDirection) > 360)) + { + throw new ArgumentOutOfRangeException("value", RingtoetsCommonDataResources.DeviationWaveDirection_Value_needs_to_be_between_negative_360_and_positive_360); + } + deviationWaveDirection = newDeviationWaveDirection; } }