area.orientation
Methods3
function Orientation.to_direction(orientation: float, eight_way: nil | boolean) -> defines.direction
Returns a 4way or 8way direction from an orientation.
Parameters
orientationfloateight_waynil | boolean[opt=false] true to get the next direction in 8-way; else 4-way
Returns
- defines.direction
function Orientation.opposite(orientation: float) -> the float
Returns the opposite orientation.
Parameters
orientationfloat
Returns
thefloatopposite orientation
function Orientation.add(orientation1: float, orientation2: float) -> the float
Add two orientations together.
Parameters
orientation1floatorientation2float
Returns
thefloatorientations added together
Fields18
Orientation.__class: string = "Orientation"
Orientation.__index : unknown
Orientation.north : number
north orientation
Orientation.east : number
east orientation
Orientation.west : number
west orientation
Orientation.south : number
south orientation
Orientation.northeast : number
northeast orientation
Orientation.northwest : number
northwest orientation
Orientation.southeast : number
southeast orientation
Orientation.southwest : number
southwest orientation
Orientation.northnortheast : number
Orientation.eastnortheast : number
Orientation.eastsoutheast : number
Orientation.southsoutheast : number
Orientation.southsouthwest : number
Orientation.westsouthwest : number
Orientation.westnorthwest : number
Orientation.northnorthwest : number