reflect
Given an incident vector i and a normal vector n, returns the reflection vector r = i - 2.0f " dot(i, n) " n.
Read time 2 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- 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.
public static float2 reflect(float2 i, float2 n)
Parameters
Returns
Type | Description |
|---|---|
| float2 | 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.
public static float3 reflect(float3 i, float3 n)
Parameters
Returns
Type | Description |
|---|---|
| float3 | 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.
public static float4 reflect(float4 i, float4 n)
Parameters
Returns
Type | Description |
|---|---|
| float4 | 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.
public static double2 reflect(double2 i, double2 n)
Parameters
Returns
Type | Description |
|---|---|
| double2 | 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.
public static double3 reflect(double3 i, double3 n)
Parameters
Returns
Type | Description |
|---|---|
| double3 | 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.
public static double4 reflect(double4 i, double4 n)
Parameters
Returns
Type | Description |
|---|---|
| double4 | Reflection vector. |