new CardinalDirection( [value] [, name] [, azimut])
The enumeration of 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.
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.
Parameters:
Name | Type | Argument | Default | Description |
---|---|---|---|---|
value |
number |
<optional> |
0 | The numeric value who define the direction. |
name |
string |
<optional> |
The name of the direction. |
|
azimut |
number |
<optional> |
0 | The azimut angle. |
Extends
- Object
Members
-
<static> ALL
-
The set of all diagonal directions (northeast, southeast, southwest, northwest).
-
<static> DIAGONALS
-
The set of all diagonal directions (northeast, southeast, southwest, northwest).
-
<static> E
-
This represents the value to set all the sides of the Rectangle (30).
-
<static> ENE
-
The East-North-East cardinal point "ENE" : Azimut:67.5° Radians:3π/8
-
<static> ESE
-
The East-South-East cardinal point "ESE" : Azimut:112,5° Radians:5π/8
-
<static> N
-
The North cardinal point "N" : Azimut:0° Radians:0
-
<static> NE
-
The North-East cardinal point "NE" : Azimut:45° Radians:π/4
-
<static> NNE
-
The North-North-East cardinal point "NNE" : Azimut:22.5° Radians:π/8
-
<static> NNW
-
The North-North-West cardinal point "NNW" : Azimut:337.5° Radians:15π/8
-
<static> NW
-
The North-West cardinal point "NW" : Azimut:315° Radians:7π/4
-
<static> ORTHOGONALS
-
The set of all orthogonals directions (north, south, south, north).
-
<static> S
-
The South cardinal point "S" : Azimut:180° Radians:π
-
<static> SE
-
The South-East cardinal point "SE" : Azimut:135° Radians:3π/4
-
<static> SSE
-
The South-South-East cardinal point "SSE" : Azimut:157.5° Radians:7π/8
-
<static> SSW
-
The South-South-West cardinal point "SSW" : Azimut:202.5° Radians:9π/8
-
<static> SW
-
The South-West cardinal point "SW" : Azimut:225° Radians:5π/4
-
<static> W
-
The West cardinal point "W" : Azimut:270° Radians:3π/2
-
<static> WNW
-
The West-North-West cardinal point "WNW" : Azimut:292.5° Radians:13π/8
-
<static> WSW
-
The West-South-West cardinal point "WSW" : Azimut:247.5° Radians:11π/8
-
azimut :number
-
Indicates the angular measurement in a spherical coordinate system (in degrees).
Type:
- number
-
toString
-
Returns the String representation of the object.
-
valueOf
-
Returns the value of the object.
Methods
-
<static> isDiagonal(direction)
-
Returns true if this is a diagonal direction (northeast, southeast, southwest, northwest).
Parameters:
Name Type Description direction
graphics.CardinalDirection The direction to check.
Returns:
true if this is a diagonal direction.
-
<static> isOrthogonal(direction)
-
Returns true if this is an orthogonal direction (north, east, south, west).
Parameters:
Name Type Description direction
graphics.CardinalDirection The direction to check.
Returns:
true if this is an orthogonal direction.