coord

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Overview

Package coord defines types and functions for coordinate conversions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Btoc

func Btoc(b byte) (x, y int)

Btoc converts a coordinate byte to x,y coordinates.

func Ctob

func Ctob(x, y int) byte

Ctob converts a x,y coordinate with x,y < 16 to a coordinate byte.

func X

func X(b byte) int

X returns the x coordinate of a coordinate byte.

func Y

func Y(b byte) int

Y returns the y coordinate of a coordinate byte.

Types

type XY added in v0.0.4

type XY struct {
	X, Y int
}

XY represents a two dimensional x,y coordinate.

Jump to

Keyboard shortcuts

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