Files
ShrlAlgoToolkit/AntdWpf/Converters/LocalEx.cs

20 lines
583 B
C#
Raw Normal View History

2025-07-11 09:20:23 +08:00
using System.Collections.Generic;
using System.Linq;
//https://github.com/MaterialDesignInXAML/MaterialDesignInXamlToolkit/blob/master/src/MaterialDesignThemes.Wpf/Converters/CircularProgressBar/LocalEx.cs
namespace AntdWpf.Converters
{
internal static class LocalEx
{
public static double ExtractDouble(this object value)
{
double d = value as double? ?? double.NaN;
return double.IsInfinity(d) ? double.NaN : d;
}
public static bool AnyNan(this IEnumerable<double> values) => values.Any(double.IsNaN);
}
}