Documentation
¶
Index ¶
- type Float32
- type Float64
- type Int
- type Int8
- type Int16
- type Int32
- type Int64
- type Of
- func New[T mathex.SignedNumber](position vector2.Of[T], size vector2.Of[T]) Of[T]
- func NewSize[T mathex.SignedNumber](size vector2.Of[T]) Of[T]
- func NewT[T mathex.SignedNumber, PT, ST mathex.SignedNumber](position vector2.Of[PT], size vector2.Of[ST]) Of[T]
- func NewXYWH[T mathex.SignedNumber](x, y, w, h T) Of[T]
- func One[T mathex.SignedNumber]() Of[T]
- func Zero[T mathex.SignedNumber]() Of[T]
- func (r Of[T]) A() vector2.Of[T]
- func (r Of[T]) AB() vector2.Of[T]
- func (r Of[T]) Add(xy vector2.Of[T], wh vector2.Of[T]) Of[T]
- func (r Of[T]) AddHeight(dH T) Of[T]
- func (r Of[T]) AddPosition(dXY vector2.Of[T]) Of[T]
- func (r Of[T]) AddPositionXY(x, y T) Of[T]
- func (r Of[T]) AddSize(dWH vector2.Of[T]) Of[T]
- func (r Of[T]) AddSizeXY(width, height T) Of[T]
- func (r Of[T]) AddWidth(dW T) Of[T]
- func (r Of[T]) AddX(dX T) Of[T]
- func (r Of[T]) AddXYWH(x, y, w, h T) Of[T]
- func (r Of[T]) AddY(dY T) Of[T]
- func (r Of[T]) B() vector2.Of[T]
- func (r Of[T]) BA() vector2.Of[T]
- func (v Of[T]) Ceil() Of[T]
- func (v Of[T]) CeilToInt() Of[int]
- func (r Of[T]) Center() vector2.Of[T]
- func (r Of[T]) Contains(v vector2.Of[T]) bool
- func (r Of[T]) EachUnitCell() iter.Seq[vector2.Of[T]]
- func (v Of[T]) Floor() Of[T]
- func (v Of[T]) FloorToInt() Of[int]
- func (r Of[T]) Grow(v T) Of[T]
- func (r Of[T]) GrowXYWH(left, top, right, bottom T) Of[T]
- func (r Of[T]) Height() T
- func (r Of[T]) HorizontalLine(y T) (vector2.Of[T], vector2.Of[T])
- func (r Of[T]) Inverse(v vector2.Float64) vector2.Float64
- func (r Of[T]) InverseF(v vector2.Float32) vector2.Float32
- func (r Of[T]) InverseLerp(v vector2.Float64) vector2.Float64
- func (r Of[T]) InverseLerpF(v vector2.Float32) vector2.Float32
- func (v Of[T]) IsZero() bool
- func (r Of[T]) Lerp(t vector2.Float64) vector2.Of[T]
- func (r Of[T]) LerpF(t vector2.Float32) vector2.Of[T]
- func (r Of[T]) LerpXYF(x, y float32) vector2.Of[T]
- func (r Of[T]) OverlappedBy(or Of[T]) bool
- func (r Of[T]) Pivot(anchor vector2.Of[T], xy vector2.Of[T]) Of[T]
- func (r Of[T]) ResetPosition() Of[T]
- func (v Of[T]) Round() Of[T]
- func (v Of[T]) RoundToInt() Of[int]
- func (r Of[T]) Scale(f float64) Of[T]
- func (r Of[T]) ScaleByVector(f vector2.Float64) Of[T]
- func (r Of[T]) ScaleByVectorF(f vector2.Float32) Of[T]
- func (r Of[T]) ScaleByXY(x, y float64) Of[T]
- func (r Of[T]) ScaleByXYF(x, y float32) Of[T]
- func (r Of[T]) ScaleF(f float32) Of[T]
- func (r Of[T]) SetA(a vector2.Of[T]) Of[T]
- func (r Of[T]) SetB(b vector2.Of[T]) Of[T]
- func (r Of[T]) SetHeight(newH T) Of[T]
- func (r Of[T]) SetPosition(newXY vector2.Of[T]) Of[T]
- func (r Of[T]) SetPositionXY(x, y T) Of[T]
- func (r Of[T]) SetSize(newWH vector2.Of[T]) Of[T]
- func (r Of[T]) SetSizeXY(width, height T) Of[T]
- func (r Of[T]) SetWidth(newW T) Of[T]
- func (r Of[T]) SetX(newX T) Of[T]
- func (r Of[T]) SetY(newY T) Of[T]
- func (r Of[T]) ShrinkXYWH(left, top, right, bottom T) Of[T]
- func (r Of[T]) String() string
- func (v Of[T]) ToFloat32() Of[float32]
- func (v Of[T]) ToFloat64() Of[float64]
- func (v Of[T]) ToInt() Of[int]
- func (v Of[T]) ToInt32() Of[int32]
- func (v Of[T]) ToInt64() Of[int64]
- func (r Of[T]) VerticalLine(x T) (vector2.Of[T], vector2.Of[T])
- func (r Of[T]) Width() T
- func (r Of[T]) X() T
- func (r Of[T]) Y() T
- func (r Of[T]) Zoom(f float64) Of[T]
- func (r Of[T]) ZoomByVector(f vector2.Float64) Of[T]
- func (r Of[T]) ZoomByVectorF(f vector2.Float32) Of[T]
- func (r Of[T]) ZoomByXY(x, y float64) Of[T]
- func (r Of[T]) ZoomByXYF(x, y float32) Of[T]
- func (r Of[T]) ZoomF(f float32) Of[T]
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Float32 ¶
func NewFloat32 ¶
type Float64 ¶
func NewFloat64 ¶
type Of ¶
func NewT ¶
func NewT[T mathex.SignedNumber, PT, ST mathex.SignedNumber](position vector2.Of[PT], size vector2.Of[ST]) Of[T]
func NewXYWH ¶
func NewXYWH[T mathex.SignedNumber](x, y, w, h T) Of[T]
func One ¶
func One[T mathex.SignedNumber]() Of[T]
func Zero ¶
func Zero[T mathex.SignedNumber]() Of[T]
func (Of[T]) AddPositionXY ¶
func (Of[T]) CeilToInt ¶
CeilToInt applies the ceil math operation to each component of the rectangle, and then casts it to a int
func (Of[T]) FloorToInt ¶
FloorToInt applies the floor math operation to each component of the rectangle, and then casts it to a int
func (Of[T]) InverseLerp ¶
InverseLerp calculates the inverse lerp of a point within the rectangle, returning a normalized vector2.Vector[T].
func (Of[T]) InverseLerpF ¶
InverseLerpF calculates the inverse lerp of a point within the rectangle, returning a normalized vector2.Float32.
func (Of[T]) OverlappedBy ¶
func (Of[T]) ResetPosition ¶
ResetPosition zero the xy component of the rectangle
func (Of[T]) Round ¶
Round takes each component of the rectangle and rounds it to the nearest whole number
func (Of[T]) RoundToInt ¶
RoundToInt takes each component of the rectangle and rounds it to the nearest whole number, and then casts it to a int
func (Of[T]) ScaleByXYF ¶
func (Of[T]) SetPosition ¶
SetPosition changes the xy component of the rectangle
func (Of[T]) SetPositionXY ¶
SetPosition changes the xy component of the rectangle