 | DirectionComputeCardinalDirection Method (Single) |
Computes the direction which is closest to the specified angle.
Angle defines rotation from forward direction (0, 1) positive counter-clockwise.
Namespace: Slash.Math.UtilsAssembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntaxpublic static DirectionType ComputeCardinalDirection(
float angle
)
Public Shared Function ComputeCardinalDirection (
angle As Single
) As DirectionType
public:
static DirectionType ComputeCardinalDirection(
float angle
)
static member ComputeCardinalDirection :
angle : float32 -> DirectionType
Parameters
- angle
- Type: SystemSingle
Angle to get direction for (from forward direction (0, 1) positive counter-clockwise).
Return Value
Type:
DirectionTypeDirection which is closest to the specified angle.
See Also