Class UnityVectorExtensions
Extensions to the Vector3 class, used by Cinemachine
Inherited Members
Namespace: Unity.Cinemachine
Assembly: solution.dll
Syntax
public static class UnityVectorExtensions
Fields
Name | Description |
---|---|
Epsilon | A useful Epsilon |
Methods
Name | Description |
---|---|
Abs(Vector2) | Component-wise absolute value |
Abs(Vector3) | Component-wise absolute value |
Almost |
Is the vector within Epsilon of zero length? |
Angle(Vector3, Vector3) | Much more stable for small angles than Unity's native implementation |
Closest |
Get the closest point on a line segment. |
Closest |
Get the closest point on a line segment. |
Find |
Calculates the intersection point defined by line_1 [p1, p2], and line_2 [q1, q2]. |
Is |
Checks if the Vector2 contains NaN for x or y. |
Is |
Checks if the Vector2 contains NaN for x or y. |
Is |
Checks whether the vector components are the same value. |
Is |
Checks whether the vector components are the same value. |
Normalize |
Put euler angle in the range of -180...180 |
Project |
Returns a non-normalized projection of the supplied vector onto a plane as described by its normal |
Safe |
Much more stable for small angles than Unity's native implementation |
Signed |
Much more stable for small angles than Unity's native implementation |
Slerp |
This is a slerp that mimics a camera operator's movement in that it chooses a path that avoids the lower hemisphere, as defined by the up param |
Square |
Normalized the vector onto the unit square instead of the unit circle |