Documentation
¶
Index ¶
- func CreateDirections[P Positioner[E], E Position](dir ...Dir) (res []E)
- type Collection
- type Dir
- type Pos
- func (p Pos) Add(b Pos) Pos
- func (p *Pos) AddSelf(o Pos)
- func (p Pos) Equal(o Pos) bool
- func (p Pos) GoString() string
- func (p Pos) IsInside(maxPos Pos) bool
- func (Pos) New(y, x int) Pos
- func (Pos) NewDir(y, x int8) Pos
- func (p Pos) String() string
- func (p Pos) Sub(b Pos) Pos
- func (p *Pos) SubSelf(o Pos)
- type Pos16
- func (p Pos16) Add(b Pos16) Pos16
- func (p *Pos16) AddSelf(o Pos16)
- func (p Pos16) GoString() string
- func (p Pos16) IsInside(maxPos Pos16) bool
- func (Pos16) New(y, x int) Pos16
- func (Pos16) NewDir(y, x int8) Pos16
- func (p Pos16) String() string
- func (p Pos16) Sub(b Pos16) Pos16
- func (p *Pos16) SubSelf(o Pos16)
- func (p Pos16) X() uint16
- func (p Pos16) Y() uint16
- type Pos32
- func (p Pos32) Add(b Pos32) Pos32
- func (p *Pos32) AddSelf(o Pos32)
- func (p Pos32) GoString() string
- func (p Pos32) IsInside(maxPos Pos32) bool
- func (Pos32) New(y, x int) Pos32
- func (Pos32) NewDir(y, x int8) Pos32
- func (p Pos32) String() string
- func (p Pos32) Sub(b Pos32) Pos32
- func (p *Pos32) SubSelf(o Pos32)
- func (p Pos32) X() uint32
- func (p Pos32) Y() uint32
- type Pos8
- func (p Pos8) Add(b Pos8) Pos8
- func (p *Pos8) AddSelf(o Pos8)
- func (p Pos8) GoString() string
- func (p Pos8) IsInside(maxPos Pos8) bool
- func (Pos8) New(y, x int) Pos8
- func (Pos8) NewDir(y, x int8) Pos8
- func (p Pos8) String() string
- func (p Pos8) Sub(b Pos8) Pos8
- func (p *Pos8) SubSelf(o Pos8)
- func (p Pos8) X() uint8
- func (p Pos8) Y() uint8
- type PosMap
- type Position
- type Positioner
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateDirections ¶
func CreateDirections[P Positioner[E], E Position](dir ...Dir) (res []E)
Types ¶
type Collection ¶
type Collection[P Positioner[E], E Position] [4]E
var ( DirectionsPos8 Collection[Pos8, Pos8] = createDirections[Pos8]() DirectionsPos16 Collection[Pos16, Pos16] = createDirections[Pos16]() DirectionsPos32 Collection[Pos32, Pos32] = createDirections[Pos32]() DirectionsPos Collection[Pos, Pos] = createDirections[Pos]() DirectionsDiagonalPos8 Collection[Pos8, Pos8] = createDiagonalDirections[Pos8]() DirectionsDiagonalPos16 Collection[Pos16, Pos16] = createDiagonalDirections[Pos16]() DirectionsDiagonalPos32 Collection[Pos32, Pos32] = createDiagonalDirections[Pos32]() DirectionsDiagonalPos Collection[Pos, Pos] = createDiagonalDirections[Pos]() )
Click to show internal directories.
Click to hide internal directories.