# isnan

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

## Definition

* **Type:** Method
* **Namespace:** [Unity.Mathematics](/engine/6000.5/script-reference/unity/mathematics.md)
* **Assembly:** UnityEngine.MathematicsModule

## isnan(float)

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

```csharp
public static bool isnan(float x)
```

### Parameters

**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): Input value.

### Returns

| Type                                                          | Description                                 |
| ------------------------------------------------------------- | ------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True 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.

```csharp
public static bool2 isnan(float2 x)
```

### Parameters

**** (\[float2]\(/engine/6000.5/script-reference/unity/mathematics/float2)): Input value.

### Returns

| Type                                                                | Description                                     |
| ------------------------------------------------------------------- | ----------------------------------------------- |
| [bool2](/engine/6000.5/script-reference/unity/mathematics/bool2.md) | True 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.

```csharp
public static bool3 isnan(float3 x)
```

### Parameters

**** (\[float3]\(/engine/6000.5/script-reference/unity/mathematics/float3)): Input value.

### Returns

| Type                                                                | Description                                     |
| ------------------------------------------------------------------- | ----------------------------------------------- |
| [bool3](/engine/6000.5/script-reference/unity/mathematics/bool3.md) | True 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.

```csharp
public static bool4 isnan(float4 x)
```

### Parameters

**** (\[float4]\(/engine/6000.5/script-reference/unity/mathematics/float4)): Input value.

### Returns

| Type                                                                | Description                                     |
| ------------------------------------------------------------------- | ----------------------------------------------- |
| [bool4](/engine/6000.5/script-reference/unity/mathematics/bool4.md) | True 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.

```csharp
public static bool isnan(double x)
```

### Parameters

**** (\[double]\(https\://learn.microsoft.com/dotnet/api/system.double)): Input value.

### Returns

| Type                                                          | Description                                 |
| ------------------------------------------------------------- | ------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | True 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.

```csharp
public static bool2 isnan(double2 x)
```

### Parameters

**** (\[double2]\(/engine/6000.5/script-reference/unity/mathematics/double2)): Input value.

### Returns

| Type                                                                | Description                                     |
| ------------------------------------------------------------------- | ----------------------------------------------- |
| [bool2](/engine/6000.5/script-reference/unity/mathematics/bool2.md) | True 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.

```csharp
public static bool3 isnan(double3 x)
```

### Parameters

**** (\[double3]\(/engine/6000.5/script-reference/unity/mathematics/double3)): Input value.

### Returns

| Type                                                                | Description                                     |
| ------------------------------------------------------------------- | ----------------------------------------------- |
| [bool3](/engine/6000.5/script-reference/unity/mathematics/bool3.md) | True 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.

```csharp
public static bool4 isnan(double4 x)
```

### Parameters

**** (\[double4]\(/engine/6000.5/script-reference/unity/mathematics/double4)): Input value.

### Returns

| Type                                                                | Description                                     |
| ------------------------------------------------------------------- | ----------------------------------------------- |
| [bool4](/engine/6000.5/script-reference/unity/mathematics/bool4.md) | True 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.
