pos

package
v0.0.0-...-e57d4e3 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Data

type Data struct {
	// contains filtered or unexported fields
}

Data information that has helpful calculation methods

func New

func New(x, y, foothold int16) Data

New portal func

func (Data) CalcDistance

func (d Data) CalcDistance(v Data) float64

CalcDistance between two pos sqrt((x1 - x2)^2 + (y1 - y2)^2)

func (Data) CalcDistanceSquare

func (d Data) CalcDistanceSquare(v Data) int

CalcDistanceSquare between two pos (x1 - x2)^2 + (y1 - y2)^2

func (Data) Foothold

func (d Data) Foothold() int16

Foothold value

func (*Data) SetFoothold

func (d *Data) SetFoothold(v int16)

SetFoothold value

func (*Data) SetX

func (d *Data) SetX(v int16)

SetX axis value

func (*Data) SetY

func (d *Data) SetY(v int16)

SetY axis value

func (Data) String

func (d Data) String() string

String representation of pos

func (Data) X

func (d Data) X() int16

X axis value

func (Data) Y

func (d Data) Y() int16

Y axis value

Jump to

Keyboard shortcuts

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