Documentation
¶
Index ¶
- func Abs(a int) int
- func Max(a, b int) int
- func Min(a, b int) int
- func MinMax(data []int) (min, max int)
- func PanicIfError(err error)
- func ReadAllInput() []string
- func ReadAllInputFromFile(name string) []string
- func StrToInt(s string) int
- func StrToInts(s string, sep string) []int
- type Matrix3x3
- type Vector2
- func (v Vector2) Add(s Vector2) Vector2
- func (v Vector2) Adjacent() []Vector2
- func (v Vector2) Mul(scalar int) Vector2
- func (v Vector2) Norm() Vector2
- func (v Vector2) Rotate(rm [2][2]int) Vector2
- func (v Vector2) RotateLeft() Vector2
- func (v Vector2) RotateRight() Vector2
- func (v Vector2) Sub(s Vector2) Vector2
- type Vector3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PanicIfError ¶
func PanicIfError(err error)
func ReadAllInput ¶
func ReadAllInput() []string
func ReadAllInputFromFile ¶
Types ¶
type Matrix3x3 ¶
type Matrix3x3 struct {
// contains filtered or unexported fields
}
func NewIdentityMatrix3x3 ¶
func NewIdentityMatrix3x3() Matrix3x3
func NewMatrix3x3 ¶
func RotationMatrixXY ¶
func RotationMatrixXZ ¶
func RotationMatrixYZ ¶
func (Matrix3x3) MulVector3 ¶
type Vector2 ¶
type Vector2 struct {
X, Y int
}
Vector2 represents a two-dimensional vector in left-handed Cartesian coordinate system
func NewVector2 ¶
func (Vector2) RotateLeft ¶
func (Vector2) RotateRight ¶
type Vector3 ¶
type Vector3 struct {
X, Y, Z int
}
func NewVector3 ¶
func (Vector3) ManhattanLength ¶
Click to show internal directories.
Click to hide internal directories.