Click or drag to resize
Direction Class
Utility methods for computing and comparing directions.
Inheritance Hierarchy
SystemObject
  Slash.Math.UtilsDirection

Namespace: Slash.Math.Utils
Assembly: Slash.Math (in Slash.Math.dll) Version: 1.0.6018.40177
Syntax
public static class Direction

The Direction type exposes the following members.

Methods
  NameDescription
Public methodStatic memberCardinalDirections
Returns an enumeration of cardinal directions (N-E-S-W).
Public methodStatic memberComputeCardinalDirection(Single)
Computes the direction which is closest to the specified angle. Angle defines rotation from forward direction (0, 1) positive counter-clockwise.
Public methodStatic memberComputeCardinalDirection(Vector2F)
Computes the direction which is closest to the specified vector.
Public methodStatic memberGetCardinalDirectionIndex
Returns the index for the specified cardinal direction to use it, e.g. in a collection.
Public methodStatic memberIsCardinalDirection(Object)
Checks if the specified value is a direction and a cardinal direction (i.e. N, E, S or W).
Public methodStatic memberIsCardinalDirection(DirectionType)
Checks if the specified direction is a cardinal direction (i.e. N, E, S or W).
Public methodStatic memberIsHorizontalDirection
Indicates if the specified direction is a horizontal one (W, E) or a vertical one (N, S).
Public methodStatic memberMoveLocation
Moves the specified location by one field into the specified direction.
Public methodStatic memberOpposite
Calculates opposite directions of given directions.
Public methodStatic memberToDirections(Vector2F)
Returns directions of a vector, based on quadrants.
Public methodStatic memberToDirections(Vector2I)
Returns directions of a vector, based on quadrants.
Public methodStatic memberToVector2F
Converts the specified direction into a vector.
Public methodStatic memberToVector2I
Converts the specified direction into a vector.
Top
See Also