Documentation
¶
Index ¶
- func Abs[T Number](a T) T
- func CountBits[T IntNumber](value T) int
- func MapKeys[K comparable, V any](m map[K]V) []K
- func Mod[T IntNumber](a, b T) T
- func Must(err error)
- func ReadAllInput() []string
- func ReadAllInputFromFile(name string) []string
- func StrToInt(str string) int
- func StrToInts(str string) []int
- type IntNumber
- type Number
- type Queue
- type Vector2
- type Vector3
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MapKeys ¶
func MapKeys[K comparable, V any](m map[K]V) []K
func ReadAllInput ¶
func ReadAllInput() []string
func ReadAllInputFromFile ¶
Types ¶
type Vector2 ¶
type Vector2[T IntNumber] struct { X T Y T }
func NewVector2 ¶
func (Vector2[T]) RotateLeft ¶
RotateLeft rotates the vector to the left (left-handed system)
func (Vector2[T]) RotateRight ¶
RotateRight rotates the vector to the right (left-handed system)
type Vector3 ¶
type Vector3[T IntNumber] struct { X T Y T Z T }
func NewVector3 ¶
func (Vector3[T]) ManhattanLen ¶
func (v Vector3[T]) ManhattanLen() T
Click to show internal directories.
Click to hide internal directories.