Packagegraphics
Classpublic class CardinalDirection
InheritanceCardinalDirection Inheritance Object

The four cardinal directions or cardinal points are the directions of north, south, east, and west, commonly denoted by their initials: N, S, E, W. They are mostly used for geographic orientation on Earth but may be calculated anywhere on a rotating astronomical body.



Public Methods
 MethodDefined By
  
CardinalDirection(value:Number = 0, name:String, azimut:Number = 0)
Creates a new CardinalDirection instance.
CardinalDirection
  
azimut():Number
Indicates the angular measurement in a spherical coordinate system (in degrees).
CardinalDirection
  
isDiagonal(direction:CardinalDirection):Boolean
[static] Returns true if this is a diagonal direction (northeast, southeast, southwest, northwest).
CardinalDirection
  
isOrthogonal(direction:CardinalDirection):Boolean
[static] Returns true if this is an orthogonal direction (north, east, south, west).
CardinalDirection
  
toSource(indent:int = 0):String
Returns the source code String representation of the object.
CardinalDirection
  
toString():String
Returns the String representation of the object.
CardinalDirection
  
valueOf():Number
Returns the primitive value of the object.
CardinalDirection
Public Constants
 ConstantDefined By
  ALL : Array
[static] The set of all diagonal directions (northeast, southeast, southwest, northwest).
CardinalDirection
  DIAGONALS : Array
[static] The set of all diagonal directions (northeast, southeast, southwest, northwest).
CardinalDirection
  E : CardinalDirection
[static] The East cardinal point "E" : Azimut:90° Radians:π/2
CardinalDirection
  ENE : CardinalDirection
[static] The East-North-East cardinal point "ENE" : Azimut:67.5° Radians:3π/8
CardinalDirection
  ESE : CardinalDirection
[static] The East-South-East cardinal point "ESE" : Azimut:112,5° Radians:5π/8
CardinalDirection
  N : CardinalDirection
[static] The North cardinal point "N" : Azimut:0° Radians:0
CardinalDirection
  NE : CardinalDirection
[static] The North-East cardinal point "NE" : Azimut:45° Radians:π/4
CardinalDirection
  NNE : CardinalDirection
[static] The North-North-East cardinal point "NNE" : Azimut:22.5° Radians:π/8
CardinalDirection
  NNW : CardinalDirection
[static] The North-North-West cardinal point "NNW" : Azimut:337.5° Radians:15π/8
CardinalDirection
  NW : CardinalDirection
[static] The North-West cardinal point "NW" : Azimut:315° Radians:7π/4
CardinalDirection
  ORTHOGONALS : Array
[static] The set of all orthogonals directions (north, south, south, north).
CardinalDirection
  S : CardinalDirection
[static] The South cardinal point "S" : Azimut:180° Radians:π
CardinalDirection
  SE : CardinalDirection
[static] The South-East cardinal point "SE" : Azimut:135° Radians:3π/4
CardinalDirection
  SSE : CardinalDirection
[static] The South-South-East cardinal point "SSE" : Azimut:157.5° Radians:7π/8
CardinalDirection
  SSW : CardinalDirection
[static] The South-South-West cardinal point "SSW" : Azimut:202.5° Radians:9π/8
CardinalDirection
  SW : CardinalDirection
[static] The South-West cardinal point "SW" : Azimut:225° Radians:5π/4
CardinalDirection
  W : CardinalDirection
[static] The West cardinal point "W" : Azimut:270° Radians:3π/2
CardinalDirection
  WNW : CardinalDirection
[static] The West-North-West cardinal point "WNW" : Azimut:292.5° Radians:13π/8
CardinalDirection
  WSW : CardinalDirection
[static] The West-South-West cardinal point "WSW" : Azimut:247.5° Radians:11π/8
CardinalDirection
Constructor Detail
CardinalDirection()Constructor
public function CardinalDirection(value:Number = 0, name:String, azimut:Number = 0)

Creates a new CardinalDirection instance.

Parameters
value:Number (default = 0) — The value of the enumeration.
 
name:String — The name key of the enumeration.
 
azimut:Number (default = 0)
Method Detail
azimut()method
public function azimut():Number

Indicates the angular measurement in a spherical coordinate system (in degrees).

Returns
Number
isDiagonal()method 
public static function isDiagonal(direction:CardinalDirection):Boolean

Returns true if this is a diagonal direction (northeast, southeast, southwest, northwest).

Parameters

direction:CardinalDirection

Returns
Boolean — true if this is a diagonal direction.
isOrthogonal()method 
public static function isOrthogonal(direction:CardinalDirection):Boolean

Returns true if this is an orthogonal direction (north, east, south, west).

Parameters

direction:CardinalDirection

Returns
Boolean — true if this is an orthogonal direction.
toSource()method 
public function toSource(indent:int = 0):String

Returns the source code String representation of the object.

Parameters

indent:int (default = 0)

Returns
String — the source code String representation of the object.
toString()method 
public function toString():String

Returns the String representation of the object.

Returns
String — the String representation of the object.
valueOf()method 
public function valueOf():Number

Returns the primitive value of the object.

Returns
Number — the primitive value of the object.
Constant Detail
ALLConstant
public static const ALL:Array

The set of all diagonal directions (northeast, southeast, southwest, northwest).

DIAGONALSConstant 
public static const DIAGONALS:Array

The set of all diagonal directions (northeast, southeast, southwest, northwest).

EConstant 
public static const E:CardinalDirection

The East cardinal point "E" : Azimut:90° Radians:π/2

ENEConstant 
public static const ENE:CardinalDirection

The East-North-East cardinal point "ENE" : Azimut:67.5° Radians:3π/8

ESEConstant 
public static const ESE:CardinalDirection

The East-South-East cardinal point "ESE" : Azimut:112,5° Radians:5π/8

NConstant 
public static const N:CardinalDirection

The North cardinal point "N" : Azimut:0° Radians:0

NEConstant 
public static const NE:CardinalDirection

The North-East cardinal point "NE" : Azimut:45° Radians:π/4

NNEConstant 
public static const NNE:CardinalDirection

The North-North-East cardinal point "NNE" : Azimut:22.5° Radians:π/8

NNWConstant 
public static const NNW:CardinalDirection

The North-North-West cardinal point "NNW" : Azimut:337.5° Radians:15π/8

NWConstant 
public static const NW:CardinalDirection

The North-West cardinal point "NW" : Azimut:315° Radians:7π/4

ORTHOGONALSConstant 
public static const ORTHOGONALS:Array

The set of all orthogonals directions (north, south, south, north).

SConstant 
public static const S:CardinalDirection

The South cardinal point "S" : Azimut:180° Radians:π

SEConstant 
public static const SE:CardinalDirection

The South-East cardinal point "SE" : Azimut:135° Radians:3π/4

SSEConstant 
public static const SSE:CardinalDirection

The South-South-East cardinal point "SSE" : Azimut:157.5° Radians:7π/8

SSWConstant 
public static const SSW:CardinalDirection

The South-South-West cardinal point "SSW" : Azimut:202.5° Radians:9π/8

SWConstant 
public static const SW:CardinalDirection

The South-West cardinal point "SW" : Azimut:225° Radians:5π/4

WConstant 
public static const W:CardinalDirection

The West cardinal point "W" : Azimut:270° Radians:3π/2

WNWConstant 
public static const WNW:CardinalDirection

The West-North-West cardinal point "WNW" : Azimut:292.5° Radians:13π/8

WSWConstant 
public static const WSW:CardinalDirection

The West-South-West cardinal point "WSW" : Azimut:247.5° Radians:11π/8