Documentation ¶
Index ¶
- func Abs[T Number](value T) T
- func ConvertNumberFloat64toInt32(v float64) int32
- func ConvertNumberInt32toFloat64(v int32) float64
- func Div[T Number](x T, y T) T
- func Inv[T Number](value T) T
- func MinMax[T Number](values ...T) (T, T)
- type BinaryTreeDirection
- type BinaryTreeNode
- func (node *BinaryTreeNode[T]) AddLeft(value T) (result *BinaryTreeNode[T])
- func (node *BinaryTreeNode[T]) AddRight(value T) (result *BinaryTreeNode[T])
- func (node *BinaryTreeNode[T]) ChildAdd(value T, direction BinaryTreeDirection) (result *BinaryTreeNode[T])
- func (node *BinaryTreeNode[T]) ChildGet(direction BinaryTreeDirection) (result optionals.Optional[*BinaryTreeNode[T]])
- func (node *BinaryTreeNode[T]) Init() *BinaryTreeNode[T]
- func (node *BinaryTreeNode[T]) IsRoot() bool
- func (node *BinaryTreeNode[T]) Left() optionals.Optional[*BinaryTreeNode[T]]
- func (node *BinaryTreeNode[T]) Prev() optionals.Optional[*BinaryTreeNode[T]]
- func (node *BinaryTreeNode[T]) Right() optionals.Optional[*BinaryTreeNode[T]]
- func (node *BinaryTreeNode[T]) SetValue(value T)
- func (node *BinaryTreeNode[T]) Value() T
- type Box
- func (box Box[T]) Center() Vector2[T]
- func (box Box[T]) CollisionPoint(point Vector2[T]) (result bool)
- func (box Box[T]) H() T
- func (box Box[T]) Position() Vector2[T]
- func (box Box[T]) Size() Vector2[T]
- func (box Box[T]) ToRaylibRectangle() rl.Rectangle
- func (box Box[T]) W() T
- func (box Box[T]) X() T
- func (box Box[T]) Y() T
- type Cached
- type Number
- type Pair
- type Vector2
- func (vector Vector2[T]) Abs() Vector2[T]
- func (vector Vector2[T]) Add(value Vector2[T]) Vector2[T]
- func (vector Vector2[T]) Copy() Vector2[T]
- func (vector Vector2[T]) Div(value Vector2[T]) Vector2[T]
- func (vector Vector2[T]) Inv() Vector2[T]
- func (vector Vector2[T]) Max() T
- func (vector Vector2[T]) Min() T
- func (vector Vector2[T]) Mul(value Vector2[T]) Vector2[T]
- func (vector Vector2[T]) Order(reversed bool) Vector2[T]
- func (vector Vector2[T]) Rev() Vector2[T]
- func (vector Vector2[T]) Sub(value Vector2[T]) Vector2[T]
- func (vector Vector2[T]) ToFloat32() Vector2[float32]
- func (vector Vector2[T]) ToFloat64() Vector2[float64]
- func (vector Vector2[T]) ToInt32() Vector2[int32]
- func (vector Vector2[T]) ToRaylib() rl.Vector2
- func (vector Vector2[T]) X() T
- func (vector Vector2[T]) Y() T
- type Vector3
- func (vector Vector3[T]) Add(value Vector3[T]) Vector3[T]
- func (vector Vector3[T]) Copy() Vector3[T]
- func (vector Vector3[T]) Div(value Vector3[T]) Vector3[T]
- func (vector Vector3[T]) Mul(value Vector3[T]) Vector3[T]
- func (vector Vector3[T]) Sub(value Vector3[T]) Vector3[T]
- func (vector Vector3[T]) ToColor() color.RGBA
- func (vector Vector3[T]) ToFloat32() Vector3[float32]
- func (vector Vector3[T]) ToFloat64() Vector3[float64]
- func (vector Vector3[T]) ToInt32() Vector3[int32]
- func (vector Vector3[T]) ToRaylib() rl.Vector3
- func (vector Vector3[T]) ToUint8() Vector3[uint8]
- func (vector Vector3[T]) X() T
- func (vector Vector3[T]) Y() T
- func (vector Vector3[T]) Z() T
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BinaryTreeDirection ¶
type BinaryTreeDirection int8
const ( BinaryTreeLeft BinaryTreeDirection = iota BinaryTreeRight )
func (BinaryTreeDirection) Opposite ¶
func (direction BinaryTreeDirection) Opposite() BinaryTreeDirection
type BinaryTreeNode ¶
type BinaryTreeNode[T any] struct { // contains filtered or unexported fields }
func NewBinaryTreeNode ¶
func NewBinaryTreeNode[T any](value T) (node *BinaryTreeNode[T])
func (*BinaryTreeNode[T]) AddLeft ¶
func (node *BinaryTreeNode[T]) AddLeft(value T) (result *BinaryTreeNode[T])
func (*BinaryTreeNode[T]) AddRight ¶
func (node *BinaryTreeNode[T]) AddRight(value T) (result *BinaryTreeNode[T])
func (*BinaryTreeNode[T]) ChildAdd ¶
func (node *BinaryTreeNode[T]) ChildAdd(value T, direction BinaryTreeDirection) (result *BinaryTreeNode[T])
func (*BinaryTreeNode[T]) ChildGet ¶
func (node *BinaryTreeNode[T]) ChildGet(direction BinaryTreeDirection) (result optionals.Optional[*BinaryTreeNode[T]])
func (*BinaryTreeNode[T]) Init ¶
func (node *BinaryTreeNode[T]) Init() *BinaryTreeNode[T]
func (*BinaryTreeNode[T]) IsRoot ¶
func (node *BinaryTreeNode[T]) IsRoot() bool
func (*BinaryTreeNode[T]) Left ¶
func (node *BinaryTreeNode[T]) Left() optionals.Optional[*BinaryTreeNode[T]]
func (*BinaryTreeNode[T]) Prev ¶
func (node *BinaryTreeNode[T]) Prev() optionals.Optional[*BinaryTreeNode[T]]
func (*BinaryTreeNode[T]) Right ¶
func (node *BinaryTreeNode[T]) Right() optionals.Optional[*BinaryTreeNode[T]]
func (*BinaryTreeNode[T]) SetValue ¶
func (node *BinaryTreeNode[T]) SetValue(value T)
func (*BinaryTreeNode[T]) Value ¶
func (node *BinaryTreeNode[T]) Value() T
type Box ¶
type Box[T Number] struct { // contains filtered or unexported fields }
func (Box[T]) CollisionPoint ¶
func (Box[T]) ToRaylibRectangle ¶
type Cached ¶
type Cached[T any] struct { // contains filtered or unexported fields }
Cached is a generic struct used to keep track of data that evolves with time Cached.supply is called under a goroutine each time Cached.value has expired
type Number ¶
type Number interface { constraints.Integer | constraints.Float }
type Vector2 ¶
type Vector2[T Number] struct { // contains filtered or unexported fields }
func NewVector2 ¶
func NewVector2Random ¶
type Vector3 ¶
type Vector3[T Number] struct { // contains filtered or unexported fields }
func NewVector3 ¶
func NewVector3Random ¶
Click to show internal directories.
Click to hide internal directories.