opensim/OpenSim/Framework/Util.cs
/// <summary>
/// Check if any of the values in a Vector3 are NaN or Infinity
/// </summary>
/// <param name="v">Vector3 to check</param>
/// <returns></returns>
Check if any of the values in a Vector3 are NaN or Infinity
Check if any of the values in a Vector3 are NaN or Infinity
public static bool IsNanOrInfinity(Vector3 v)
        {
            if (float.IsNaN(v.X) || float.IsNaN(v.Y) || float.IsNaN(v.Z))
                return true;
            if (float.IsInfinity(v.X) || float.IsInfinity(v.Y) || float.IsNaN(v.Z))
                return true;
            return false;
        }
public static bool IsNanOrInfinity ( Vector3 v ) { if ( float . IsNaN ( v . X ) || float . IsNaN ( v . Y ) || float . IsNaN ( v . Z ) ) return true ; if ( float . IsInfinity ( v . X ) || float . IsInfinity ( v . Y ) || float . IsNaN ( v . Z ) ) return true ; return false ; }
Check if any of the values in a Vector3 are NaN or Infinity
Check if any of the values in a Vector3 are NaN or Infinity
None
v
Vector3
Vector3 to check
Vector3 to check