projectonplane
Returns the projection of a onto the line through the origin that is perpendicular to planeNormal.
Read time 3 minutesLast updated 5 days ago
Definition
- Type: Method
- Namespace: Unity.Mathematics
- Assembly: UnityEngine.MathematicsModule
projectonplane(float2, float2)
Returns the projection of a onto the line through the origin that is perpendicular to planeNormal.
public static float2 projectonplane(float2 a, float2 planeNormal)
Parameters
Returns
Type | Description |
|---|---|
| float2 | The projection of a onto the line perpendicular to planeNormal. |
Remarks
planeNormal doesn't need to be unit length but must not be zero. Some finite inputs could generate a non-finite result, most likely when a's components are very large or planeNormal's components are very small. In these cases, you can call math.projectonplanesafe which will use a given default value if the result is not finite.
projectonplane(float3, float3)
Returns the projection of a onto the plane through the origin with normal planeNormal.
public static float3 projectonplane(float3 a, float3 planeNormal)
Parameters
Returns
Type | Description |
|---|---|
| float3 | The projection of a onto the plane. |
Remarks
planeNormal doesn't need to be unit length but must not be zero. Some finite inputs could generate a non-finite result, most likely when a's components are very large or planeNormal's components are very small. In these cases, you can call math.projectonplanesafe which will use a given default value if the result is not finite.
projectonplane(float4, float4)
Returns the projection of a onto the hyperplane through the origin with normal planeNormal.
public static float4 projectonplane(float4 a, float4 planeNormal)
Parameters
Returns
Type | Description |
|---|---|
| float4 | The projection of a onto the hyperplane. |
Remarks
planeNormal doesn't need to be unit length but must not be zero. Some finite inputs could generate a non-finite result, most likely when a's components are very large or planeNormal's components are very small. In these cases, you can call math.projectonplanesafe which will use a given default value if the result is not finite.
projectonplane(double2, double2)
Returns the projection of a onto the line through the origin that is perpendicular to planeNormal.
public static double2 projectonplane(double2 a, double2 planeNormal)
Parameters
Returns
Type | Description |
|---|---|
| double2 | The projection of a onto the line perpendicular to planeNormal. |
Remarks
planeNormal doesn't need to be unit length but must not be zero. Some finite inputs could generate a non-finite result, most likely when a's components are very large or planeNormal's components are very small. In these cases, you can call math.projectonplanesafe which will use a given default value if the result is not finite.
projectonplane(double3, double3)
Returns the projection of a onto the plane through the origin with normal planeNormal.
public static double3 projectonplane(double3 a, double3 planeNormal)
Parameters
Returns
Type | Description |
|---|---|
| double3 | The projection of a onto the plane. |
Remarks
planeNormal doesn't need to be unit length but must not be zero. Some finite inputs could generate a non-finite result, most likely when a's components are very large or planeNormal's components are very small. In these cases, you can call math.projectonplanesafe which will use a given default value if the result is not finite.
projectonplane(double4, double4)
Returns the projection of a onto the hyperplane through the origin with normal planeNormal.
public static double4 projectonplane(double4 a, double4 planeNormal)
Parameters
Returns
Type | Description |
|---|---|
| double4 | The projection of a onto the hyperplane. |
Remarks
planeNormal doesn't need to be unit length but must not be zero. Some finite inputs could generate a non-finite result, most likely when a's components are very large or planeNormal's components are very small. In these cases, you can call math.projectonplanesafe which will use a given default value if the result is not finite.