lixiaojun
2025-03-17 85fc43aa549bbe24c4d867a055c0d90d21deba8b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
namespace Yw.WinFrmUI.Hydro
{
    /// <summary>
    /// float拓展
    /// </summary>
    internal static class FloatL3dExtensions
    {
        /// <summary>
        /// 是否无效
        /// </summary>
        public static bool Invalid(this float rhs)
        {
            if (float.IsNaN(rhs) || rhs == float.MinValue || rhs == float.MaxValue)
            {
                return true;
            }
            return false;
        }
 
        /// <summary>
        /// 是否有效
        /// </summary>
        public static bool Valid(this float rhs)
        {
            return !rhs.Invalid();
        }
    }
}