Method | Description | |
---|---|---|
BiasToCardinals ( this vectorToBias, float biasAngle ) : |
If the supplied vector is within the supplied angle of a cardinal direction, this will return the cardinal direction. Otherwise it will just return the same angle.
|
|
GetDegreesBetweenVectorsCCW ( |
Returns the angle in degrees from one Vector2 to another. Degrees are signed, with CCW being positive.
|
|
IsDirectionWithinArc ( this vector, |
Determines if the direction vector is within the arc specified by a direction bisecting an angle.
|
|
IsNormalized ( this vector ) : bool |
Determines if the vector is normalized (magnitude of 1)
|
|
RotateClockwiseByRadians ( this vector, float angle ) : |
Rotates the vector clockwise by an angle in radius
|
|
RoundToCardinals ( this vectorToRound ) : |
Rounds the input vector to the closest cardinal direction and returns the rounded result.
|
|
RoundToNearestArc ( this vector, int numArcs, float rotationDegrees = 0.0f ) : |
Rounds to nearest arc (with 4 arcs, all vectors that point from -45 to 45 return (1.0, 0.0))
|
Method | Description | |
---|---|---|
GetBisectorForArc ( this vector, int arc, int numArcs, float rotationDegrees = 0.0f ) : |
||
GetNearestArc ( this vector, int numArcs, float rotationDegrees = 0.0f ) : int |
public static BiasToCardinals ( this vectorToBias, float biasAngle ) : |
||
vectorToBias | this | Vector to bias. |
biasAngle | float | Bias angle. |
return |
public static GetDegreesBetweenVectorsCCW ( |
||
fromVector | The from vector | |
toVector | The to vector | |
return | float |
public static IsDirectionWithinArc ( this vector, |
||
vector | this | Source Direction Vector |
arcBisector | Arc bisector | |
arcAngle | float | Arc angle |
return | bool |
public static IsNormalized ( this vector ) : bool | ||
vector | this | Vector to test. |
return | bool |
public static RotateClockwiseByRadians ( this vector, float angle ) : |
||
vector | this | Vector to rotate. |
angle | float | Angle in radians |
return |
public static RoundToCardinals ( this vectorToRound ) : |
||
vectorToRound | this | Vector to round. |
return |
public static RoundToNearestArc ( this vector, int numArcs, float rotationDegrees = 0.0f ) : |
||
vector | this | The vector to convert. |
numArcs | int | The number of arcs to divide the circle into. |
rotationDegrees | float | Optional rotation of arcs |
return |