way9type

package
v0.0.0-...-d7572e3 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Center    Way9Type = iota //
	North                     //
	NorthEast                 //
	East                      //
	SouthEast                 //
	South                     //
	SouthWest                 //
	West                      //
	NorthWest                 //

	Way9Type_Count int = iota
)

Variables

This section is empty.

Functions

func CalcDxDyWrapped

func CalcDxDyWrapped(dx, dy, xLen, yLen int) (int, int)

wrap dxdy

func VtValidate

func VtValidate(x, y int) bool

Types

type Way9Type

type Way9Type uint8

func CalcContactDirWrapped

func CalcContactDirWrapped(from, to [2]int, xLen, yLen int) (bool, Way9Type)

iscontact and dir with wrap

func CalcContactDirWrappedXY

func CalcContactDirWrappedXY(x1, y1, x2, y2, xLen, yLen int) (bool, Way9Type)

func Call4WayTile

func Call4WayTile(ox, oy int, fn func(int, int) bool) []Way9Type

func Call8WayTile

func Call8WayTile(ox, oy int, fn func(int, int) bool) []Way9Type

func ContactDxDy2Way9

func ContactDxDy2Way9(dx, dy int) Way9Type

contact only

func RemoteDxDy2Way5

func RemoteDxDy2Way5(dx, dy int) Way9Type

find remote pos to 4way

func RemoteDxDy2Way9

func RemoteDxDy2Way9(dx, dy int) Way9Type

find remote pos to 8way

func String2Way9Type

func String2Way9Type(s string) (Way9Type, bool)

func Vt2Dir

func Vt2Dir(x, y int) Way9Type

func (Way9Type) Add

func (dt Way9Type) Add(dt2 Way9Type) Way9Type

func (Way9Type) CommentString

func (e Way9Type) CommentString() string

func (Way9Type) Dx

func (dt Way9Type) Dx() int

func (Way9Type) DxDy

func (dt Way9Type) DxDy() (int, int)

func (Way9Type) Dy

func (dt Way9Type) Dy() int

func (Way9Type) InverseX

func (dt Way9Type) InverseX() Way9Type

func (Way9Type) InverseY

func (dt Way9Type) InverseY() Way9Type

func (Way9Type) IsValid

func (dt Way9Type) IsValid() bool

is this need?

func (Way9Type) Len

func (dt Way9Type) Len() float64

func (Way9Type) MulXY

func (dt Way9Type) MulXY(x, y int) (int, int)

func (Way9Type) ReverseDir

func (dt Way9Type) ReverseDir() Way9Type

func (Way9Type) String

func (e Way9Type) String() string

func (Way9Type) TurnDir

func (dt Way9Type) TurnDir(turn int8) Way9Type

Jump to

Keyboard shortcuts

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