namespace Yw.WinFrmUI.HydroL3d { /// /// float拓展 /// public static class FloatExtensions { /// /// 是否无效 /// public static bool Invalid(this float rhs) { if (float.IsNaN(rhs) || rhs == float.MinValue || rhs == float.MaxValue) { return true; } return false; } /// /// 是否有效 /// /// /// public static bool Valid(this float rhs) { return !rhs.Invalid(); } } }