common

package
v0.0.0-...-fcffdc5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	None      Direction = 0
	North     Direction = 1
	South     Direction = 2
	East      Direction = 4
	West      Direction = 8
	Northeast           = North | East
	Northwest           = North | West
	Southeast           = South | East
	Southwest           = South | West
)

Variables

View Source
var FourDirections = []Direction{
	South, North, East, West,
}

Functions

This section is empty.

Types

type Direction

type Direction uint8

func GetDir

func GetDir(x1, y1, x2, y2 uint) Direction

func (Direction) EightDirectionIndex

func (d Direction) EightDirectionIndex() uint

func (Direction) FourDirectionIndex

func (d Direction) FourDirectionIndex() uint

func (Direction) Invoke

func (d Direction) Invoke(usr *types.Datum, name string, parameters ...types.Value) types.Value

func (Direction) IsValid

func (d Direction) IsValid() bool

func (Direction) NearestCardinal

func (d Direction) NearestCardinal() Direction

func (Direction) SetVar

func (d Direction) SetVar(name string, value types.Value)

func (Direction) String

func (d Direction) String() string

func (Direction) Var

func (d Direction) Var(name string) types.Value

func (Direction) XY

func (d Direction) XY() (x, y int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL