Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

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

Incident vector.

Normal vector.

Returns

Type

Description

float2Reflection 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

Incident vector.

Normal vector.

Returns

Type

Description

float3Reflection 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

Incident vector.

Normal vector.

Returns

Type

Description

float4Reflection 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

Incident vector.

Normal vector.

Returns

Type

Description

double2Reflection 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

Incident vector.

Normal vector.

Returns

Type

Description

double3Reflection 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

Incident vector.

Normal vector.

Returns

Type

Description

double4Reflection vector.