name
name: (Direction) -> stringThe constant's name as declared.
Direction.valueOf(…)
Direction.NORTH
Direction.SOUTH| Method | Returns | Description |
|---|---|---|
name() | string | The constant's name as declared. |
ordinal() | number | The constant's 0-based position in values(). |
toString() | string | name(); tostring(c) answers the same. |
compareTo(Direction) | number | This ordinal less other's. |
equals(any) | boolean | Whether other is this constant. == answers the same. |
values() | {Direction} | Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it. |
valueOf(string) | Direction | valueOf(name): the constant named name; any other name is an error. |
| Method | Returns | Description |
|---|---|---|
Angle.getNearestDirection | Direction | The cardinal Direction nearest this angle. |
DirectionClass.valueOf | Direction | valueOf(name): the constant named name; any other name is an error. |
DirectionClass.values | {Direction} | Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it. |
namename: (Direction) -> stringThe constant's name as declared.
ordinalordinal: (Direction) -> numberThe constant's 0-based position in values().
toStringtoString: (Direction) -> stringname(); tostring(c) answers the same.
compareTocompareTo: (Direction, Direction) -> numberThis ordinal less other's.
equalsequals: (Direction, any) -> booleanWhether other is this constant. == answers the same.
valuesvalues: () -> {Direction}Every constant in ordinal order, as a 1-based array: the same frozen array every values() call, so table.clone it before changing it.
valueOfvalueOf: (string) -> DirectionvalueOf(name): the constant named name; any other name is an error.