Documentation
¶
Index ¶
- type Box
- func (a Box) Area() int
- func (a Box) BotLeft() Vector2
- func (a Box) BotRight() Vector2
- func (a Box) Center() Vector2
- func (a Box) CollideWith(b Box) bool
- func (a Box) Contains(p Vector2) bool
- func (a Box) Offset(p Vector2) Box
- func (a Box) SizeX() int
- func (a Box) SizeY() int
- func (a Box) TopLeft() Vector2
- func (a Box) TopRight() Vector2
- type Direction
- type Vector2
- func (a Vector2) Add(b Vector2) Vector2
- func (a Vector2) DirectionTo(b Vector2) Direction
- func (a Vector2) Distance(b Vector2) int
- func (a Vector2) Div(i int) Vector2
- func (a Vector2) Length() int
- func (a Vector2) Lerp(b Vector2, i float32) Vector2
- func (a Vector2) LineBresenham(b Vector2, width int) []Vector2
- func (a Vector2) LineHV(b Vector2, width int) []Vector2
- func (a Vector2) LineVH(b Vector2, width int) []Vector2
- func (a Vector2) LookingAt(b Vector2, dir Direction) bool
- func (a Vector2) Minus(b Vector2) Vector2
- func (a Vector2) Mod(i int) Vector2
- func (a Vector2) Mul(i int) Vector2
- func (a Vector2) Neighbors() [4]Vector2
- func (a Vector2) Rotate(dir Direction) Vector2
- func (a Vector2) Sum(other ...Vector2) Vector2
- func (a Vector2) ToString() string
- type Vector3
- func (a Vector3) Add(b Vector3) Vector3
- func (a Vector3) Div(i int) Vector3
- func (a Vector3) Lerp(b Vector3, i float32) Vector3
- func (a Vector3) Minus(b Vector3) Vector3
- func (a Vector3) Mod(i int) Vector3
- func (a Vector3) Mul(i int) Vector3
- func (a Vector3) Sum(other ...Vector3) Vector3
- func (a Vector3) ToString() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Direction ¶
type Direction int
func (Direction) ClockCount ¶
func (Direction) CounterClockwise ¶
type Vector2 ¶
type Vector2 struct {
X, Y int
}
func Vector2One ¶
func Vector2One() Vector2
func Vector2Zero ¶
func Vector2Zero() Vector2
func (Vector2) DirectionTo ¶
func (Vector2) LineBresenham ¶
NOTE: width is currently unimplemented
type Vector3 ¶
type Vector3 struct {
X, Y, Z int
}
func Vector3One ¶
func Vector3One() Vector3
func Vector3Zero ¶
func Vector3Zero() Vector3
Click to show internal directories.
Click to hide internal directories.