Method project
project(float2, float2)
Compute vector projection of a onto b.
Declaration
public static float2 project(float2 a, float2 b)
Parameters
| Type | Name | Description |
|---|---|---|
| float2 | a | Vector to project. |
| float2 | b | Non-zero vector to project onto. |
Returns
| Type | Description |
|---|---|
| float2 | Vector projection of a onto b. |
Remarks
Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call projectsafe(float2, float2, float2) which will use a given default value if the result is not finite.
project(float3, float3)
Compute vector projection of a onto b.
Declaration
public static float3 project(float3 a, float3 b)
Parameters
| Type | Name | Description |
|---|---|---|
| float3 | a | Vector to project. |
| float3 | b | Non-zero vector to project onto. |
Returns
| Type | Description |
|---|---|
| float3 | Vector projection of a onto b. |
Remarks
Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call projectsafe(float3, float3, float3) which will use a given default value if the result is not finite.
project(float4, float4)
Compute vector projection of a onto b.
Declaration
public static float4 project(float4 a, float4 b)
Parameters
| Type | Name | Description |
|---|---|---|
| float4 | a | Vector to project. |
| float4 | b | Non-zero vector to project onto. |
Returns
| Type | Description |
|---|---|
| float4 | Vector projection of a onto b. |
Remarks
Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Single.MaxValue) or when b's components are very small (close to FLT_MIN_NORMAL). In these cases, you can call projectsafe(float4, float4, float4) which will use a given default value if the result is not finite.
project(double2, double2)
Compute vector projection of a onto b.
Declaration
public static double2 project(double2 a, double2 b)
Parameters
| Type | Name | Description |
|---|---|---|
| double2 | a | Vector to project. |
| double2 | b | Non-zero vector to project onto. |
Returns
| Type | Description |
|---|---|
| double2 | Vector projection of a onto b. |
Remarks
Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call projectsafe(double2, double2, double2) which will use a given default value if the result is not finite.
project(double3, double3)
Compute vector projection of a onto b.
Declaration
public static double3 project(double3 a, double3 b)
Parameters
| Type | Name | Description |
|---|---|---|
| double3 | a | Vector to project. |
| double3 | b | Non-zero vector to project onto. |
Returns
| Type | Description |
|---|---|
| double3 | Vector projection of a onto b. |
Remarks
Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call projectsafe(double3, double3, double3) which will use a given default value if the result is not finite.
project(double4, double4)
Compute vector projection of a onto b.
Declaration
public static double4 project(double4 a, double4 b)
Parameters
| Type | Name | Description |
|---|---|---|
| double4 | a | Vector to project. |
| double4 | b | Non-zero vector to project onto. |
Returns
| Type | Description |
|---|---|
| double4 | Vector projection of a onto b. |
Remarks
Some finite vectors a and b could generate a non-finite result. This is most likely when a's components are very large (close to Double.MaxValue) or when b's components are very small (close to DBL_MIN_NORMAL). In these cases, you can call projectsafe(double4, double4, double4) which will use a given default value if the result is not finite.