Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

math.isnan

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Declaration

public static bool isnan(float x);

Parameters

Parameter Description
x Input value.

Returns

bool True if the value was NaN; false otherwise.

Description

Returns true if the input float is a NaN (not a number) floating point value, false otherwise.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool2 isnan(float2 x);

Parameters

Parameter Description
x Input value.

Returns

bool2 True if the component was NaN; false otherwise.

Description

Returns a bool2 indicating for each component of a float2 whether it is a NaN (not a number) floating point value.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool3 isnan(float3 x);

Parameters

Parameter Description
x Input value.

Returns

bool3 True if the component was NaN; false otherwise.

Description

Returns a bool3 indicating for each component of a float3 whether it is a NaN (not a number) floating point value.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool4 isnan(float4 x);

Parameters

Parameter Description
x Input value.

Returns

bool4 True if the component was NaN; false otherwise.

Description

Returns a bool4 indicating for each component of a float4 whether it is a NaN (not a number) floating point value.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool isnan(double x);

Parameters

Parameter Description
x Input value.

Returns

bool True if the value was NaN; false otherwise.

Description

Returns true if the input double is a NaN (not a number) floating point value, false otherwise.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool2 isnan(double2 x);

Parameters

Parameter Description
x Input value.

Returns

bool2 True if the component was NaN; false otherwise.

Description

Returns a bool2 indicating for each component of a double2 whether it is a NaN (not a number) floating point value.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool3 isnan(double3 x);

Parameters

Parameter Description
x Input value.

Returns

bool3 True if the component was NaN; false otherwise.

Description

Returns a bool3 indicating for each component of a double3 whether it is a NaN (not a number) floating point value.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.


Declaration

public static bool4 isnan(double4 x);

Parameters

Parameter Description
x Input value.

Returns

bool4 True if the component was NaN; false otherwise.

Description

Returns a bool4 indicating for each component of a double4 whether it is a NaN (not a number) floating point value.

NaN has several representations and may vary across architectures. Use this function to check if you have a NaN.