# reflect

> Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f " dot(i, n) " n.

## Definition

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

## reflect(float2, float2)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f " dot(i, n) " n.

```csharp
public static float2 reflect(float2 i, float2 n)
```

### Parameters

**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): Incident vector.**** (\[float2]\(/engine/6000.7/script-reference/unity/mathematics/float2)): Normal vector.

### Returns

| Type                                                                  | Description        |
| --------------------------------------------------------------------- | ------------------ |
| [float2](/engine/6000.7/script-reference/unity/mathematics/float2.md) | Reflection vector. |

## reflect(float3, float3)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f " dot(i, n) " n.

```csharp
public static float3 reflect(float3 i, float3 n)
```

### Parameters

**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): Incident vector.**** (\[float3]\(/engine/6000.7/script-reference/unity/mathematics/float3)): Normal vector.

### Returns

| Type                                                                  | Description        |
| --------------------------------------------------------------------- | ------------------ |
| [float3](/engine/6000.7/script-reference/unity/mathematics/float3.md) | Reflection vector. |

## reflect(float4, float4)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f " dot(i, n) " n.

```csharp
public static float4 reflect(float4 i, float4 n)
```

### Parameters

**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): Incident vector.**** (\[float4]\(/engine/6000.7/script-reference/unity/mathematics/float4)): Normal vector.

### Returns

| Type                                                                  | Description        |
| --------------------------------------------------------------------- | ------------------ |
| [float4](/engine/6000.7/script-reference/unity/mathematics/float4.md) | Reflection vector. |

## reflect(double2, double2)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 " dot(i, n) " n.

```csharp
public static double2 reflect(double2 i, double2 n)
```

### Parameters

**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): Incident vector.**** (\[double2]\(/engine/6000.7/script-reference/unity/mathematics/double2)): Normal vector.

### Returns

| Type                                                                    | Description        |
| ----------------------------------------------------------------------- | ------------------ |
| [double2](/engine/6000.7/script-reference/unity/mathematics/double2.md) | Reflection vector. |

## reflect(double3, double3)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 " dot(i, n) " n.

```csharp
public static double3 reflect(double3 i, double3 n)
```

### Parameters

**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): Incident vector.**** (\[double3]\(/engine/6000.7/script-reference/unity/mathematics/double3)): Normal vector.

### Returns

| Type                                                                    | Description        |
| ----------------------------------------------------------------------- | ------------------ |
| [double3](/engine/6000.7/script-reference/unity/mathematics/double3.md) | Reflection vector. |

## reflect(double4, double4)

Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0 " dot(i, n) " n.

```csharp
public static double4 reflect(double4 i, double4 n)
```

### Parameters

**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): Incident vector.**** (\[double4]\(/engine/6000.7/script-reference/unity/mathematics/double4)): Normal vector.

### Returns

| Type                                                                    | Description        |
| ----------------------------------------------------------------------- | ------------------ |
| [double4](/engine/6000.7/script-reference/unity/mathematics/double4.md) | Reflection vector. |
