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

math.reflect

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 float2 reflect(float2 i, float2 n);

Parameters

Parameter Description
i Incident vector.
n Normal vector.

Returns

float2 Reflection vector.

Description

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


Declaration

public static float3 reflect(float3 i, float3 n);

Parameters

Parameter Description
i Incident vector.
n Normal vector.

Returns

float3 Reflection vector.

Description

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


Declaration

public static float4 reflect(float4 i, float4 n);

Parameters

Parameter Description
i Incident vector.
n Normal vector.

Returns

float4 Reflection vector.

Description

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


Declaration

public static double2 reflect(double2 i, double2 n);

Parameters

Parameter Description
i Incident vector.
n Normal vector.

Returns

double2 Reflection vector.

Description

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


Declaration

public static double3 reflect(double3 i, double3 n);

Parameters

Parameter Description
i Incident vector.
n Normal vector.

Returns

double3 Reflection vector.

Description

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


Declaration

public static double4 reflect(double4 i, double4 n);

Parameters

Parameter Description
i Incident vector.
n Normal vector.

Returns

double4 Reflection vector.

Description

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