Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


isnan

Returns true if the input float is a NaN (not a number) floating point value, false otherwise.
Read time 3 minutesLast updated 12 days ago

Definition

isnan(float)

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

Parameters

Input value.

Returns

Type

Description

boolTrue if the value was NaN; false otherwise.

Remarks

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

isnan(float2)

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

Parameters

Input value.

Returns

Type

Description

bool2True if the component was NaN; false otherwise.

Remarks

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

isnan(float3)

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

Parameters

Input value.

Returns

Type

Description

bool3True if the component was NaN; false otherwise.

Remarks

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

isnan(float4)

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

Parameters

Input value.

Returns

Type

Description

bool4True if the component was NaN; false otherwise.

Remarks

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

isnan(double)

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

Parameters

Input value.

Returns

Type

Description

boolTrue if the value was NaN; false otherwise.

Remarks

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

isnan(double2)

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

Parameters

Input value.

Returns

Type

Description

bool2True if the component was NaN; false otherwise.

Remarks

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

isnan(double3)

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

Parameters

Input value.

Returns

Type

Description

bool3True if the component was NaN; false otherwise.

Remarks

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

isnan(double4)

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

Parameters

Input value.

Returns

Type

Description

bool4True if the component was NaN; false otherwise.

Remarks

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