aoc

package
v0.0.0-...-8c55224 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(a int) int

func Max

func Max(a, b int) int

func Min

func Min(a, b int) int

func ReadAllInput

func ReadAllInput() []string

func ReadInput

func ReadInput(handler func(string) error) error

func StrToInt

func StrToInt(s string) int

func StrToInts

func StrToInts(s string, sep string) []int

func VerifyIntBetween

func VerifyIntBetween(numberSt string, min, max int) bool

Types

type Stack

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

func (*Stack) IsEmpty

func (l *Stack) IsEmpty() bool

func (*Stack) Peek

func (l *Stack) Peek() interface{}

func (*Stack) Pop

func (l *Stack) Pop() interface{}

func (*Stack) Push

func (l *Stack) Push(v interface{})

type Vector2

type Vector2 struct {
	X, Y int
}

Vector2 represents a two-dimensional vector in left-handed Cartesian coordinate system

func NewVector2

func NewVector2(x, y int) Vector2

func (Vector2) Add

func (v Vector2) Add(s Vector2) Vector2

func (Vector2) Mul

func (v Vector2) Mul(scalar int) Vector2

func (Vector2) Rotate

func (v Vector2) Rotate(rm [2][2]int) Vector2

func (Vector2) RotateLeft

func (v Vector2) RotateLeft() Vector2

func (Vector2) RotateRight

func (v Vector2) RotateRight() Vector2

type Vector3

type Vector3 struct {
	X, Y, Z int
}

func NewVector3

func NewVector3(x, y, z int) Vector3

type Vector4

type Vector4 struct {
	X, Y, Z, W int
}

func NewVector4

func NewVector4(x, y, z, w int) Vector4

Jump to

Keyboard shortcuts

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