/// <summary> /// This function is used to ensure that a FPing point number is /// not a NaN or infinity. /// </summary> /// <param name="x">The x.</param> /// <returns> /// <c>true</c> if the specified x is valid; otherwise, <c>false</c>. /// </returns> public static bool IsValid(FP x) { if (FP.IsNaN(x)) { // NaN. return(false); } return(!FP.IsInfinity(x)); }
public static bool IsValid(FP x) { bool flag = FP.IsNaN(x); return(!flag && !FP.IsInfinity(x)); }