Documentation ¶
Index ¶
- Variables
- func Abs[T signedInts](a T) T
- func Add[T any](slice []T, index int, elem T) []T
- func AddToSlice[T any](slice []*T, pos int, item *T) []*T
- func CeilDiv(numerator uint32, denominator uint32) uint32
- func CeilLog1p[T constraints.Integer](x T) int
- func CeilLog2[T constraints.Integer](x T) int
- func Clamp(v int32, a int32, b int32, c int32) int32
- func Clamp3(v int32, a int32, b int32) int32
- func Clamp3Float32(v float32, a float32, b float32) float32
- func CompareMatrix2D[T any](a [][]T, b [][]T, compare func(T, T) bool) bool
- func CompareMatrix3D[T any](a [][][]T, b [][][]T, compare func(T, T) bool) bool
- func DeepCopy3[T comparable](a [][][]T) [][][]T
- func FillFloat32(a []float32, fromIndex uint32, toIndex uint32, val float32)
- func FloorLog1p[T constraints.Integer](x T) int64
- func ForwardDCT2D(src [][]float32, dest [][]float32, startIn Point, startOut Point, ...) error
- func IfThenElse[T any](condition bool, a T, b T) T
- func InverseDCT2D(src [][]float32, dest [][]float32, startIn Point, startOut Point, ...) error
- func InvertMatrix3x3(matrix [][]float32) [][]float32
- func MakeMatrix2D[T any, S constraints.Integer](a S, b S) [][]T
- func MakeMatrix3D[T any](a int, b int, c int) [][][]T
- func MakeMatrix4D[T any](a int, b int, c int, d int) [][][][]T
- func Matrix3Equal[T comparable](a [][][]T, b [][][]T) bool
- func MatrixIdentity(i int) [][]float32
- func MatrixMatrixMultiply(left [][]float32, right [][]float32) ([][]float32, error)
- func MatrixMultiply(matrix ...[][]float32) ([][]float32, error)
- func MatrixVectorMultiply(matrix [][]float32, columnVector []float32) ([]float32, error)
- func Max[T cmp.Ordered](args ...T) T
- func Min[T cmp.Ordered](args ...T) T
- func MirrorCoordinate(coordinate int32, size int32) int32
- func RangeIterator(startX uint32, startY uint32, endX uint32, endY uint32) func() (*Point, error)
- func RangeIteratorWithIntPoint(ip Point) func() (*Point, error)
- func SignedPow(base float32, exponent float32) float32
- func TransposeMatrix(matrix [][]float32, inSize Point) [][]float32
- func TransposeMatrixInto(src [][]float32, dest [][]float32, srcStart Point, destStart Point, ...)
- type Deque
- type Dimension
- type Point
- type Rectangle
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ZERO = *NewPoint(0, 0)
)
Functions ¶
func AddToSlice ¶
func CeilLog1p ¶
func CeilLog1p[T constraints.Integer](x T) int
func CeilLog2 ¶
func CeilLog2[T constraints.Integer](x T) int
func CompareMatrix2D ¶
func CompareMatrix3D ¶
func DeepCopy3 ¶
func DeepCopy3[T comparable](a [][][]T) [][][]T
func FloorLog1p ¶
func FloorLog1p[T constraints.Integer](x T) int64
func ForwardDCT2D ¶
func IfThenElse ¶
func InverseDCT2D ¶
func InvertMatrix3x3 ¶
func MakeMatrix2D ¶
func MakeMatrix2D[T any, S constraints.Integer](a S, b S) [][]T
func Matrix3Equal ¶
func Matrix3Equal[T comparable](a [][][]T, b [][][]T) bool
func MatrixIdentity ¶
func MatrixMatrixMultiply ¶
func MatrixMultiply ¶
multiply any number of matrices
func MatrixVectorMultiply ¶
func MirrorCoordinate ¶
func RangeIterator ¶
COULD try out the new Go 1.23 iter package, but to keep backwards compatibility will just use something basic and simple.
func TransposeMatrix ¶
Types ¶
type Deque ¶
type Deque[T any] struct { // contains filtered or unexported fields }
Deque double ended queue to mimic Java version (or at least the functionality I need).
func (*Deque[T]) RemoveFirst ¶
func (dq *Deque[T]) RemoveFirst() *T
func (*Deque[T]) RemoveLast ¶
func (dq *Deque[T]) RemoveLast() *T
Click to show internal directories.
Click to hide internal directories.