Vector3Ext.GetClosestAxis Method
Gets the vector which is the dominant negative or positive axis it is mostly pointing towards.
Namespace: UltimateXR.Extensions.Unity.Math
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static Vector3 GetClosestAxis(
this Vector3 vector
)
Parameters
- vector
- Type: Vector3
Vector to process
Return Value
Type: Vector3
Can return right, up, forward, - right, -up or -forward.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Vector3. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).