diff options
author | Tanner Gooding <tagoo@outlook.com> | 2017-07-24 20:06:38 +0300 |
---|---|---|
committer | Tanner Gooding <tagoo@outlook.com> | 2017-07-26 17:55:14 +0300 |
commit | 1194cdd15a91f0431c19cb2a03d5959aa698e658 (patch) | |
tree | 3e2fdf21f180a9bddb7c8b69b085060b1e260a27 /src/System.Runtime.WindowsRuntime.UI.Xaml | |
parent | 6d6ea8f1c903609ecdecc95df3c66db34cd30d13 (diff) |
Updating cases of `IsInfinity || IsNaN` to be `!IsFinite`.
Diffstat (limited to 'src/System.Runtime.WindowsRuntime.UI.Xaml')
-rw-r--r-- | src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/GridLength.cs | 2 | ||||
-rw-r--r-- | src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/Media/Animation/RepeatBehavior.cs | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/GridLength.cs b/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/GridLength.cs index 2ff17bd973..682924b720 100644 --- a/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/GridLength.cs +++ b/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/GridLength.cs @@ -47,7 +47,7 @@ namespace Windows.UI.Xaml public GridLength(double value, GridUnitType type) { - if (Double.IsNaN(value) || Double.IsInfinity(value) || value < 0.0) + if (!double.IsFinite(value) || value < 0.0) { throw new ArgumentException(SR.DirectUI_InvalidArgument, nameof(value)); } diff --git a/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/Media/Animation/RepeatBehavior.cs b/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/Media/Animation/RepeatBehavior.cs index a902e790cc..d8f89ee0cf 100644 --- a/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/Media/Animation/RepeatBehavior.cs +++ b/src/System.Runtime.WindowsRuntime.UI.Xaml/src/System/Windows/Media/Animation/RepeatBehavior.cs @@ -41,9 +41,7 @@ namespace Windows.UI.Xaml.Media.Animation public RepeatBehavior(double count) { - if (Double.IsInfinity(count) - || Double.IsNaN(count) - || count < 0.0) + if (!double.IsFinite(count) || count < 0.0) { throw new ArgumentOutOfRangeException(nameof(count)); } |