wotoMath

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Epsilon = 0.00001

Variables

This section is empty.

Functions

func Distance

func Distance(a *Vector2, b *Vector2) float64

func DistanceInt

func DistanceInt(a *Vector2Int, b *Vector2Int) float64

func Dot

func Dot(ihs *Vector2, rhs *Vector2) float64

func DotInt

func DotInt(ihs *Vector2Int, rhs *Vector2Int) int

func EqualFloats32

func EqualFloats32(a, b float32) bool

func EqualFloats64

func EqualFloats64(a, b float64) bool

func EqualFloatsT32

func EqualFloatsT32(a, b float32, tolerance int) bool

func EqualFloatsT64

func EqualFloatsT64(a, b float64, tolerance int) bool

func EqualSignFloats32

func EqualSignFloats32(a, b float32) bool

func EqualSignFloats64

func EqualSignFloats64(a, b float64) bool

func GetFloatingCount32

func GetFloatingCount32(a float32) int

func GetFloatingCount64

func GetFloatingCount64(a float64) int

func MaxInt

func MaxInt(a, b int) int

func MaxInt8

func MaxInt8(a, b int8) int8

func MaxInt16

func MaxInt16(a, b int16) int16

func MaxInt32

func MaxInt32(a, b int32) int32

func MaxInt64

func MaxInt64(a, b int64) int64

func MaxUInt

func MaxUInt(a, b uint) uint

func MaxUInt8

func MaxUInt8(a, b uint8) uint8

func MaxUInt16

func MaxUInt16(a, b uint16) uint16

func MaxUInt32

func MaxUInt32(a, b uint32) uint32

func MaxUInt64

func MaxUInt64(a, b uint64) uint64

func MinInt

func MinInt(a, b int) int

func MinInt8

func MinInt8(a, b int8) int8

func MinInt16

func MinInt16(a, b int16) int16

func MinInt32

func MinInt32(a, b int32) int32

func MinInt64

func MinInt64(a, b int64) int64

func MinUInt

func MinUInt(a, b uint) uint

func MinUInt8

func MinUInt8(a, b uint8) uint8

func MinUInt16

func MinUInt16(a, b uint16) uint16

func MinUInt32

func MinUInt32(a, b uint32) uint32

func MinUInt64

func MinUInt64(a, b uint64) uint64

func Sqrt

func Sqrt(a int) float64

Types

type Rectangle

type Rectangle struct {
	Size     Vector2
	Location Vector2
}

func NewRectangle

func NewRectangle(x, y, width, height float64) *Rectangle

func NewRectangleVect

func NewRectangleVect(location, size Vector2) *Rectangle

func (*Rectangle) Bottom

func (r *Rectangle) Bottom() float64

func (*Rectangle) BottomLeft

func (r *Rectangle) BottomLeft() Vector2

func (*Rectangle) BottomRight

func (r *Rectangle) BottomRight() Vector2

func (*Rectangle) Contains

func (r *Rectangle) Contains(rect Rectangle) bool

Contains method will check and see if `rect` argument is in its region or not (even if it's only 0.1 point, it will return true).

func (*Rectangle) ContainsPoint

func (r *Rectangle) ContainsPoint(point Vector2) bool

func (*Rectangle) Encloses

func (r *Rectangle) Encloses(rect Rectangle) bool

Encloses method will check and see if the current rectangle completely closes the `rect` argument or not. it should contains all four major points of the argument, which are `top-left`, `top-right`, `bottom-left` and `bottom-right`. if this rectangle doesn't contain even "one of the them", this method will return false.

func (*Rectangle) Height

func (r *Rectangle) Height() float64

func (*Rectangle) IsEmpty

func (r *Rectangle) IsEmpty() bool

func (*Rectangle) IsLarger

func (r *Rectangle) IsLarger(rect Rectangle) bool

func (*Rectangle) IsLargerOrEqual

func (r *Rectangle) IsLargerOrEqual(rect Rectangle) bool

func (*Rectangle) IsSmaller

func (r *Rectangle) IsSmaller(rect Rectangle) bool

func (*Rectangle) IsSmallerOrEqual

func (r *Rectangle) IsSmallerOrEqual(rect Rectangle) bool

func (*Rectangle) Left

func (r *Rectangle) Left() float64

func (*Rectangle) Right

func (r *Rectangle) Right() float64

func (*Rectangle) Top

func (r *Rectangle) Top() float64

func (*Rectangle) TopLeft

func (r *Rectangle) TopLeft() Vector2

func (*Rectangle) TopRight

func (r *Rectangle) TopRight() Vector2

func (*Rectangle) Width

func (r *Rectangle) Width() float64

type RectangleInt

type RectangleInt struct {
	Size     Vector2Int
	Location Vector2Int
}

func NewRectangleInt

func NewRectangleInt(x, y, width, height int) *RectangleInt

func NewRectangleIntVector

func NewRectangleIntVector(location, size Vector2Int) *RectangleInt

func (*RectangleInt) Bottom

func (r *RectangleInt) Bottom() int

func (*RectangleInt) BottomLeft

func (r *RectangleInt) BottomLeft() Vector2Int

func (*RectangleInt) BottomRight

func (r *RectangleInt) BottomRight() Vector2Int

func (*RectangleInt) Contains

func (r *RectangleInt) Contains(rect RectangleInt) bool

Contains method will check and see if `rect` argument is in its region or not (even if it's only 0.1 point, it will return true).

func (*RectangleInt) ContainsPoint

func (r *RectangleInt) ContainsPoint(point Vector2Int) bool

func (*RectangleInt) Encloses

func (r *RectangleInt) Encloses(rect RectangleInt) bool

Encloses method will check and see if the current rectangle completely closes the `rect` argument or not. it should contains all four major points of the argument, which are `top-left`, `top-right`, `bottom-left` and `bottom-right`. if this rectangle doesn't contain even "one of the them", this method will return false.

func (*RectangleInt) Height

func (r *RectangleInt) Height() int

func (*RectangleInt) IsEmpty

func (r *RectangleInt) IsEmpty() bool

func (*RectangleInt) IsLarger

func (r *RectangleInt) IsLarger(rect RectangleInt) bool

func (*RectangleInt) IsLargerOrEqual

func (r *RectangleInt) IsLargerOrEqual(rect RectangleInt) bool

func (*RectangleInt) IsSmaller

func (r *RectangleInt) IsSmaller(rect RectangleInt) bool

func (*RectangleInt) IsSmallerOrEqual

func (r *RectangleInt) IsSmallerOrEqual(rect RectangleInt) bool

func (*RectangleInt) Left

func (r *RectangleInt) Left() int

func (*RectangleInt) Right

func (r *RectangleInt) Right() int

func (*RectangleInt) Top

func (r *RectangleInt) Top() int

func (*RectangleInt) TopLeft

func (r *RectangleInt) TopLeft() Vector2Int

func (*RectangleInt) TopRight

func (r *RectangleInt) TopRight() Vector2Int

func (*RectangleInt) Width

func (r *RectangleInt) Width() int

type RectangleInt8

type RectangleInt8 struct {
	Size     Vector2Int8
	Location Vector2Int8
}

func NewRectangleInt8

func NewRectangleInt8(x, y, width, height int8) *RectangleInt8

func NewRectangleInt8Vector

func NewRectangleInt8Vector(location, size Vector2Int8) *RectangleInt8

type RectangleInt16

type RectangleInt16 struct {
	Size     Vector2Int16
	Location Vector2Int16
}

func NewRectangleInt16

func NewRectangleInt16(x, y, width, height int16) *RectangleInt16

func NewRectangleInt16Vector

func NewRectangleInt16Vector(location, size Vector2Int16) *RectangleInt16

type RectangleInt32

type RectangleInt32 struct {
	Size     Vector2Int32
	Location Vector2Int32
}

func NewRectangleInt32

func NewRectangleInt32(x, y, width, height int32) *RectangleInt32

func NewRectangleInt32Vector

func NewRectangleInt32Vector(location, size Vector2Int32) *RectangleInt32

type RectangleInt64

type RectangleInt64 struct {
	Size     Vector2Int64
	Location Vector2Int64
}

func NewRectangleInt64

func NewRectangleInt64(x, y, width, height int64) *RectangleInt64

func NewRectangleInt64Vector

func NewRectangleInt64Vector(location, size Vector2Int64) *RectangleInt64

type RectangleUInt

type RectangleUInt struct {
	Size     Vector2UInt
	Location Vector2UInt
}

func NewRectangleUInt

func NewRectangleUInt(x, y, width, height uint) *RectangleUInt

func NewRectangleUIntVector

func NewRectangleUIntVector(location, size Vector2UInt) *RectangleUInt

func (*RectangleUInt) Bottom

func (r *RectangleUInt) Bottom() uint

func (*RectangleUInt) BottomLeft

func (r *RectangleUInt) BottomLeft() Vector2UInt

func (*RectangleUInt) BottomRight

func (r *RectangleUInt) BottomRight() Vector2UInt

func (*RectangleUInt) Contains

func (r *RectangleUInt) Contains(rect RectangleUInt) bool

Contains method will check and see if `rect` argument is in its region or not (even if it's only 0.1 point, it will return true).

func (*RectangleUInt) ContainsPouint

func (r *RectangleUInt) ContainsPouint(point Vector2UInt) bool

func (*RectangleUInt) Encloses

func (r *RectangleUInt) Encloses(rect RectangleUInt) bool

Encloses method will check and see if the current rectangle completely closes the `rect` argument or not. it should contains all four major points of the argument, which are `top-left`, `top-right`, `bottom-left` and `bottom-right`. if this rectangle doesn't contain even "one of the them", this method will return false.

func (*RectangleUInt) Height

func (r *RectangleUInt) Height() uint

func (*RectangleUInt) IsEmpty

func (r *RectangleUInt) IsEmpty() bool

func (*RectangleUInt) IsLarger

func (r *RectangleUInt) IsLarger(rect RectangleUInt) bool

func (*RectangleUInt) IsLargerOrEqual

func (r *RectangleUInt) IsLargerOrEqual(rect RectangleUInt) bool

func (*RectangleUInt) IsSmaller

func (r *RectangleUInt) IsSmaller(rect RectangleUInt) bool

func (*RectangleUInt) IsSmallerOrEqual

func (r *RectangleUInt) IsSmallerOrEqual(rect RectangleUInt) bool

func (*RectangleUInt) Left

func (r *RectangleUInt) Left() uint

func (*RectangleUInt) Right

func (r *RectangleUInt) Right() uint

func (*RectangleUInt) Top

func (r *RectangleUInt) Top() uint

func (*RectangleUInt) TopLeft

func (r *RectangleUInt) TopLeft() Vector2UInt

func (*RectangleUInt) TopRight

func (r *RectangleUInt) TopRight() Vector2UInt

func (*RectangleUInt) Width

func (r *RectangleUInt) Width() uint

type RectangleUInt8

type RectangleUInt8 struct {
	Size     Vector2UInt8
	Location Vector2UInt8
}

func NewRectangleUInt8

func NewRectangleUInt8(x, y, width, height uint8) *RectangleUInt8

func NewRectangleUInt8Vector

func NewRectangleUInt8Vector(location, size Vector2UInt8) *RectangleUInt8

type RectangleUInt16

type RectangleUInt16 struct {
	Size     Vector2UInt16
	Location Vector2UInt16
}

func NewRectangleUInt16

func NewRectangleUInt16(x, y, width, height uint16) *RectangleUInt16

func NewRectangleUInt16Vector

func NewRectangleUInt16Vector(location, size Vector2UInt16) *RectangleUInt16

type RectangleUInt32

type RectangleUInt32 struct {
	Size     Vector2UInt32
	Location Vector2UInt32
}

func NewRectangleUInt32

func NewRectangleUInt32(x, y, width, height uint32) *RectangleUInt32

func NewRectangleUInt32Vector

func NewRectangleUInt32Vector(location, size Vector2UInt32) *RectangleUInt32

type RectangleUInt64

type RectangleUInt64 struct {
	Size     Vector2UInt64
	Location Vector2UInt64
}

func NewRectangleUInt64

func NewRectangleUInt64(x, y, width, height uint64) *RectangleUInt64

func NewRectangleUInt64Vector

func NewRectangleUInt64Vector(location, size Vector2UInt64) *RectangleUInt64

type Vector2

type Vector2 struct {
	X, Y float64
}

func Lerp

func Lerp(a *Vector2, b *Vector2, t float64) *Vector2

func NewVector2

func NewVector2(x float64, y float64) *Vector2

func Reflect

func Reflect(ihs *Vector2, rhs *Vector2) *Vector2

func (*Vector2) Add

func (v *Vector2) Add(other *Vector2) *Vector2

func (*Vector2) AddScalar

func (v *Vector2) AddScalar(scalar float64) *Vector2

func (*Vector2) AddScalarThis

func (v *Vector2) AddScalarThis(scalar float64) *Vector2

func (*Vector2) AddScalars

func (v *Vector2) AddScalars(x, y float64) *Vector2

func (*Vector2) AddScalarsThis

func (v *Vector2) AddScalarsThis(x, y float64) *Vector2

func (*Vector2) AddThis

func (v *Vector2) AddThis(other *Vector2) *Vector2

func (*Vector2) Copy

func (v *Vector2) Copy() *Vector2

func (*Vector2) Distance

func (v *Vector2) Distance(other *Vector2) float64

func (*Vector2) Div

func (v *Vector2) Div(other *Vector2) *Vector2

func (*Vector2) DivScalar

func (v *Vector2) DivScalar(scalar float64) *Vector2

func (*Vector2) DivScalarThis

func (v *Vector2) DivScalarThis(scalar float64) *Vector2

func (*Vector2) DivScalars

func (v *Vector2) DivScalars(x, y float64) *Vector2

func (*Vector2) DivScalarsThis

func (v *Vector2) DivScalarsThis(x, y float64) *Vector2

func (*Vector2) DivThis

func (v *Vector2) DivThis(other *Vector2) *Vector2

func (*Vector2) Dot

func (v *Vector2) Dot(other *Vector2) float64

func (*Vector2) Equals

func (v *Vector2) Equals(other *Vector2) bool

func (*Vector2) EqualsScalarX

func (v *Vector2) EqualsScalarX(x float64) bool

func (*Vector2) EqualsScalarY

func (v *Vector2) EqualsScalarY(y float64) bool

func (*Vector2) EqualsX

func (v *Vector2) EqualsX(other *Vector2) bool

func (*Vector2) EqualsY

func (v *Vector2) EqualsY(other *Vector2) bool

func (*Vector2) IsBiggerOrEqualX

func (v *Vector2) IsBiggerOrEqualX(vect Vector2) bool

func (*Vector2) IsBiggerOrEqualY

func (v *Vector2) IsBiggerOrEqualY(vect Vector2) bool

func (*Vector2) IsBiggerX

func (v *Vector2) IsBiggerX(vect Vector2) bool

func (*Vector2) IsBiggerY

func (v *Vector2) IsBiggerY(vect Vector2) bool

func (*Vector2) IsLarger

func (v *Vector2) IsLarger(vect Vector2) bool

func (*Vector2) IsLargerOrEqual

func (v *Vector2) IsLargerOrEqual(vect Vector2) bool

func (*Vector2) IsLargerOrEqualXY

func (v *Vector2) IsLargerOrEqualXY(vect Vector2) bool

func (*Vector2) IsLargerXY

func (v *Vector2) IsLargerXY(vect Vector2) bool

func (*Vector2) IsSmaller

func (v *Vector2) IsSmaller(vect Vector2) bool

func (*Vector2) IsSmallerOrEqual

func (v *Vector2) IsSmallerOrEqual(vect Vector2) bool

func (*Vector2) IsSmallerOrEqualX

func (v *Vector2) IsSmallerOrEqualX(vect Vector2) bool

func (*Vector2) IsSmallerOrEqualXY

func (v *Vector2) IsSmallerOrEqualXY(vect Vector2) bool

func (*Vector2) IsSmallerOrEqualY

func (v *Vector2) IsSmallerOrEqualY(vect Vector2) bool

func (*Vector2) IsSmallerX

func (v *Vector2) IsSmallerX(vect Vector2) bool

func (*Vector2) IsSmallerXY

func (v *Vector2) IsSmallerXY(vect Vector2) bool

func (*Vector2) IsSmallerY

func (v *Vector2) IsSmallerY(vect Vector2) bool

func (*Vector2) IsZero

func (v *Vector2) IsZero() bool

func (*Vector2) IsZeroX

func (v *Vector2) IsZeroX() bool

func (*Vector2) IsZeroXOrY

func (v *Vector2) IsZeroXOrY() bool

func (*Vector2) IsZeroY

func (v *Vector2) IsZeroY() bool

func (*Vector2) Lerp

func (v *Vector2) Lerp(other *Vector2, t float64) *Vector2

func (*Vector2) Magnitude

func (v *Vector2) Magnitude() float64

func (*Vector2) Mul

func (v *Vector2) Mul(other *Vector2) *Vector2

func (*Vector2) MulScalar

func (v *Vector2) MulScalar(scalar float64) *Vector2

func (*Vector2) MulScalarThis

func (v *Vector2) MulScalarThis(scalar float64) *Vector2

func (*Vector2) MulScalars

func (v *Vector2) MulScalars(x, y float64) *Vector2

func (*Vector2) MulScalarsThis

func (v *Vector2) MulScalarsThis(x, y float64) *Vector2

func (*Vector2) MulThis

func (v *Vector2) MulThis(other *Vector2) *Vector2

func (*Vector2) Normalize

func (v *Vector2) Normalize() *Vector2

func (*Vector2) Reflect

func (v *Vector2) Reflect(other *Vector2) *Vector2

func (*Vector2) Serialize

func (v *Vector2) Serialize() string

func (*Vector2) Set

func (v *Vector2) Set(x float64, y float64) *Vector2

func (*Vector2) SetX

func (v *Vector2) SetX(x float64) *Vector2

func (*Vector2) SetY

func (v *Vector2) SetY(y float64) *Vector2

func (*Vector2) Sub

func (v *Vector2) Sub(other *Vector2) *Vector2

func (*Vector2) SubScalar

func (v *Vector2) SubScalar(scalar float64) *Vector2

func (*Vector2) SubScalarThis

func (v *Vector2) SubScalarThis(scalar float64) *Vector2

func (*Vector2) SubScalars

func (v *Vector2) SubScalars(x, y float64) *Vector2

func (*Vector2) SubScalarsThis

func (v *Vector2) SubScalarsThis(x, y float64) *Vector2

func (*Vector2) SubThis

func (v *Vector2) SubThis(other *Vector2) *Vector2

func (*Vector2) ToString

func (v *Vector2) ToString() string

type Vector2Int

type Vector2Int struct {
	X, Y int
}

func LerpInt

func LerpInt(a *Vector2Int, b *Vector2Int, t int) *Vector2Int

func NewVector2Int

func NewVector2Int(x int, y int) *Vector2Int

func ReflectInt

func ReflectInt(ihs *Vector2Int, rhs *Vector2Int) *Vector2Int

func (*Vector2Int) Add

func (v *Vector2Int) Add(other *Vector2Int) *Vector2Int

func (*Vector2Int) AddScalar

func (v *Vector2Int) AddScalar(scalar int) *Vector2Int

func (*Vector2Int) AddScalarThis

func (v *Vector2Int) AddScalarThis(scalar int) *Vector2Int

func (*Vector2Int) AddScalars

func (v *Vector2Int) AddScalars(x, y int) *Vector2Int

func (*Vector2Int) AddScalarsThis

func (v *Vector2Int) AddScalarsThis(x, y int) *Vector2Int

func (*Vector2Int) AddThis

func (v *Vector2Int) AddThis(other *Vector2Int) *Vector2Int

func (*Vector2Int) Copy

func (v *Vector2Int) Copy() *Vector2Int

func (*Vector2Int) Distance

func (v *Vector2Int) Distance(other *Vector2Int) int

func (*Vector2Int) Div

func (v *Vector2Int) Div(other *Vector2Int) *Vector2Int

func (*Vector2Int) DivScalar

func (v *Vector2Int) DivScalar(scalar int) *Vector2Int

func (*Vector2Int) DivScalarThis

func (v *Vector2Int) DivScalarThis(scalar int) *Vector2Int

func (*Vector2Int) DivScalars

func (v *Vector2Int) DivScalars(x, y int) *Vector2Int

func (*Vector2Int) DivScalarsThis

func (v *Vector2Int) DivScalarsThis(x, y int) *Vector2Int

func (*Vector2Int) DivThis

func (v *Vector2Int) DivThis(other *Vector2Int) *Vector2Int

func (*Vector2Int) Dot

func (v *Vector2Int) Dot(other *Vector2Int) int

func (*Vector2Int) Equals

func (v *Vector2Int) Equals(other *Vector2Int) bool

func (*Vector2Int) EqualsScalarX

func (v *Vector2Int) EqualsScalarX(x int) bool

func (*Vector2Int) EqualsScalarY

func (v *Vector2Int) EqualsScalarY(y int) bool

func (*Vector2Int) EqualsX

func (v *Vector2Int) EqualsX(other *Vector2Int) bool

func (*Vector2Int) EqualsY

func (v *Vector2Int) EqualsY(other *Vector2Int) bool

func (*Vector2Int) IsBiggerOrEqualX

func (v *Vector2Int) IsBiggerOrEqualX(vect Vector2Int) bool

func (*Vector2Int) IsBiggerOrEqualY

func (v *Vector2Int) IsBiggerOrEqualY(vect Vector2Int) bool

func (*Vector2Int) IsBiggerX

func (v *Vector2Int) IsBiggerX(vect Vector2Int) bool

func (*Vector2Int) IsBiggerY

func (v *Vector2Int) IsBiggerY(vect Vector2Int) bool

func (*Vector2Int) IsLarger

func (v *Vector2Int) IsLarger(vect Vector2Int) bool

func (*Vector2Int) IsLargerOrEqual

func (v *Vector2Int) IsLargerOrEqual(vect Vector2Int) bool

func (*Vector2Int) IsLargerOrEqualXY

func (v *Vector2Int) IsLargerOrEqualXY(vect Vector2Int) bool

func (*Vector2Int) IsLargerXY

func (v *Vector2Int) IsLargerXY(vect Vector2Int) bool

func (*Vector2Int) IsSmaller

func (v *Vector2Int) IsSmaller(vect Vector2Int) bool

func (*Vector2Int) IsSmallerOrEqual

func (v *Vector2Int) IsSmallerOrEqual(vect Vector2Int) bool

func (*Vector2Int) IsSmallerOrEqualX

func (v *Vector2Int) IsSmallerOrEqualX(vect Vector2Int) bool

func (*Vector2Int) IsSmallerOrEqualXY

func (v *Vector2Int) IsSmallerOrEqualXY(vect Vector2Int) bool

func (*Vector2Int) IsSmallerOrEqualY

func (v *Vector2Int) IsSmallerOrEqualY(vect Vector2Int) bool

func (*Vector2Int) IsSmallerX

func (v *Vector2Int) IsSmallerX(vect Vector2Int) bool

func (*Vector2Int) IsSmallerXY

func (v *Vector2Int) IsSmallerXY(vect Vector2Int) bool

func (*Vector2Int) IsSmallerY

func (v *Vector2Int) IsSmallerY(vect Vector2Int) bool

func (*Vector2Int) IsZero

func (v *Vector2Int) IsZero() bool

func (*Vector2Int) IsZeroX

func (v *Vector2Int) IsZeroX() bool

func (*Vector2Int) IsZeroXOrY

func (v *Vector2Int) IsZeroXOrY() bool

func (*Vector2Int) IsZeroY

func (v *Vector2Int) IsZeroY() bool

func (*Vector2Int) Lerp

func (v *Vector2Int) Lerp(other *Vector2Int, t int) *Vector2Int

func (*Vector2Int) Magnitude

func (v *Vector2Int) Magnitude() int

func (*Vector2Int) Mul

func (v *Vector2Int) Mul(other *Vector2Int) *Vector2Int

func (*Vector2Int) MulScalar

func (v *Vector2Int) MulScalar(scalar int) *Vector2Int

func (*Vector2Int) MulScalarThis

func (v *Vector2Int) MulScalarThis(scalar int) *Vector2Int

func (*Vector2Int) MulScalars

func (v *Vector2Int) MulScalars(x, y int) *Vector2Int

func (*Vector2Int) MulScalarsThis

func (v *Vector2Int) MulScalarsThis(x, y int) *Vector2Int

func (*Vector2Int) MulThis

func (v *Vector2Int) MulThis(other *Vector2Int) *Vector2Int

func (*Vector2Int) Normalize

func (v *Vector2Int) Normalize() *Vector2Int

func (*Vector2Int) Reflect

func (v *Vector2Int) Reflect(other *Vector2Int) *Vector2Int

func (*Vector2Int) Serialize

func (v *Vector2Int) Serialize() string

func (*Vector2Int) Set

func (v *Vector2Int) Set(x int, y int) *Vector2Int

func (*Vector2Int) SetX

func (v *Vector2Int) SetX(x int) *Vector2Int

func (*Vector2Int) SetY

func (v *Vector2Int) SetY(y int) *Vector2Int

func (*Vector2Int) Sub

func (v *Vector2Int) Sub(other *Vector2Int) *Vector2Int

func (*Vector2Int) SubScalar

func (v *Vector2Int) SubScalar(scalar int) *Vector2Int

func (*Vector2Int) SubScalarThis

func (v *Vector2Int) SubScalarThis(scalar int) *Vector2Int

func (*Vector2Int) SubScalars

func (v *Vector2Int) SubScalars(x, y int) *Vector2Int

func (*Vector2Int) SubScalarsThis

func (v *Vector2Int) SubScalarsThis(x, y int) *Vector2Int

func (*Vector2Int) SubThis

func (v *Vector2Int) SubThis(other *Vector2Int) *Vector2Int

func (*Vector2Int) ToString

func (v *Vector2Int) ToString() string

type Vector2Int8

type Vector2Int8 struct {
	X, Y int8
}

func NewVector2Int8

func NewVector2Int8(x int8, y int8) *Vector2Int8

type Vector2Int16

type Vector2Int16 struct {
	X, Y int16
}

func NewVector2Int16

func NewVector2Int16(x int16, y int16) *Vector2Int16

type Vector2Int32

type Vector2Int32 struct {
	X, Y int32
}

func NewVector2Int32

func NewVector2Int32(x int32, y int32) *Vector2Int32

type Vector2Int64

type Vector2Int64 struct {
	X, Y int64
}

func NewVector2Int64

func NewVector2Int64(x int64, y int64) *Vector2Int64

type Vector2UInt

type Vector2UInt struct {
	X, Y uint
}

func NewVector2UInt

func NewVector2UInt(x uint, y uint) *Vector2UInt

func (*Vector2UInt) Add

func (v *Vector2UInt) Add(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) AddScalar

func (v *Vector2UInt) AddScalar(scalar uint) *Vector2UInt

func (*Vector2UInt) AddScalarThis

func (v *Vector2UInt) AddScalarThis(scalar uint) *Vector2UInt

func (*Vector2UInt) AddScalars

func (v *Vector2UInt) AddScalars(x, y uint) *Vector2UInt

func (*Vector2UInt) AddScalarsThis

func (v *Vector2UInt) AddScalarsThis(x, y uint) *Vector2UInt

func (*Vector2UInt) AddThis

func (v *Vector2UInt) AddThis(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) Copy

func (v *Vector2UInt) Copy() *Vector2UInt

func (*Vector2UInt) Distance

func (v *Vector2UInt) Distance(other *Vector2UInt) uint

func (*Vector2UInt) Div

func (v *Vector2UInt) Div(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) DivScalar

func (v *Vector2UInt) DivScalar(scalar uint) *Vector2UInt

func (*Vector2UInt) DivScalarThis

func (v *Vector2UInt) DivScalarThis(scalar uint) *Vector2UInt

func (*Vector2UInt) DivScalars

func (v *Vector2UInt) DivScalars(x, y uint) *Vector2UInt

func (*Vector2UInt) DivScalarsThis

func (v *Vector2UInt) DivScalarsThis(x, y uint) *Vector2UInt

func (*Vector2UInt) DivThis

func (v *Vector2UInt) DivThis(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) Dot

func (v *Vector2UInt) Dot(other *Vector2UInt) uint

func (*Vector2UInt) Equals

func (v *Vector2UInt) Equals(other *Vector2UInt) bool

func (*Vector2UInt) EqualsScalarX

func (v *Vector2UInt) EqualsScalarX(x uint) bool

func (*Vector2UInt) EqualsScalarY

func (v *Vector2UInt) EqualsScalarY(y uint) bool

func (*Vector2UInt) EqualsX

func (v *Vector2UInt) EqualsX(other *Vector2UInt) bool

func (*Vector2UInt) EqualsY

func (v *Vector2UInt) EqualsY(other *Vector2UInt) bool

func (*Vector2UInt) IsBiggerOrEqualX

func (v *Vector2UInt) IsBiggerOrEqualX(vect Vector2UInt) bool

func (*Vector2UInt) IsBiggerOrEqualY

func (v *Vector2UInt) IsBiggerOrEqualY(vect Vector2UInt) bool

func (*Vector2UInt) IsBiggerX

func (v *Vector2UInt) IsBiggerX(vect Vector2UInt) bool

func (*Vector2UInt) IsBiggerY

func (v *Vector2UInt) IsBiggerY(vect Vector2UInt) bool

func (*Vector2UInt) IsLarger

func (v *Vector2UInt) IsLarger(vect Vector2UInt) bool

func (*Vector2UInt) IsLargerOrEqual

func (v *Vector2UInt) IsLargerOrEqual(vect Vector2UInt) bool

func (*Vector2UInt) IsLargerOrEqualXY

func (v *Vector2UInt) IsLargerOrEqualXY(vect Vector2UInt) bool

func (*Vector2UInt) IsLargerXY

func (v *Vector2UInt) IsLargerXY(vect Vector2UInt) bool

func (*Vector2UInt) IsSmaller

func (v *Vector2UInt) IsSmaller(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerOrEqual

func (v *Vector2UInt) IsSmallerOrEqual(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerOrEqualX

func (v *Vector2UInt) IsSmallerOrEqualX(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerOrEqualXY

func (v *Vector2UInt) IsSmallerOrEqualXY(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerOrEqualY

func (v *Vector2UInt) IsSmallerOrEqualY(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerX

func (v *Vector2UInt) IsSmallerX(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerXY

func (v *Vector2UInt) IsSmallerXY(vect Vector2UInt) bool

func (*Vector2UInt) IsSmallerY

func (v *Vector2UInt) IsSmallerY(vect Vector2UInt) bool

func (*Vector2UInt) IsZero

func (v *Vector2UInt) IsZero() bool

func (*Vector2UInt) IsZeroX

func (v *Vector2UInt) IsZeroX() bool

func (*Vector2UInt) IsZeroXOrY

func (v *Vector2UInt) IsZeroXOrY() bool

func (*Vector2UInt) IsZeroY

func (v *Vector2UInt) IsZeroY() bool

func (*Vector2UInt) Lerp

func (v *Vector2UInt) Lerp(other *Vector2UInt, t uint) *Vector2UInt

func (*Vector2UInt) Magnitude

func (v *Vector2UInt) Magnitude() uint

func (*Vector2UInt) Mul

func (v *Vector2UInt) Mul(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) MulScalar

func (v *Vector2UInt) MulScalar(scalar uint) *Vector2UInt

func (*Vector2UInt) MulScalarThis

func (v *Vector2UInt) MulScalarThis(scalar uint) *Vector2UInt

func (*Vector2UInt) MulScalars

func (v *Vector2UInt) MulScalars(x, y uint) *Vector2UInt

func (*Vector2UInt) MulScalarsThis

func (v *Vector2UInt) MulScalarsThis(x, y uint) *Vector2UInt

func (*Vector2UInt) MulThis

func (v *Vector2UInt) MulThis(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) Normalize

func (v *Vector2UInt) Normalize() *Vector2UInt

func (*Vector2UInt) Serialize

func (v *Vector2UInt) Serialize() string

func (*Vector2UInt) Set

func (v *Vector2UInt) Set(x uint, y uint) *Vector2UInt

func (*Vector2UInt) SetX

func (v *Vector2UInt) SetX(x uint) *Vector2UInt

func (*Vector2UInt) SetY

func (v *Vector2UInt) SetY(y uint) *Vector2UInt

func (*Vector2UInt) Sub

func (v *Vector2UInt) Sub(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) SubScalar

func (v *Vector2UInt) SubScalar(scalar uint) *Vector2UInt

func (*Vector2UInt) SubScalarThis

func (v *Vector2UInt) SubScalarThis(scalar uint) *Vector2UInt

func (*Vector2UInt) SubScalars

func (v *Vector2UInt) SubScalars(x, y uint) *Vector2UInt

func (*Vector2UInt) SubScalarsThis

func (v *Vector2UInt) SubScalarsThis(x, y uint) *Vector2UInt

func (*Vector2UInt) SubThis

func (v *Vector2UInt) SubThis(other *Vector2UInt) *Vector2UInt

func (*Vector2UInt) ToString

func (v *Vector2UInt) ToString() string

type Vector2UInt8

type Vector2UInt8 struct {
	X, Y uint8
}

func NewVector2UInt8

func NewVector2UInt8(x uint8, y uint8) *Vector2UInt8

type Vector2UInt16

type Vector2UInt16 struct {
	X, Y uint16
}

func NewVector2UInt16

func NewVector2UInt16(x uint16, y uint16) *Vector2UInt16

type Vector2UInt32

type Vector2UInt32 struct {
	X, Y uint32
}

func NewVector2UInt32

func NewVector2UInt32(x uint32, y uint32) *Vector2UInt32

type Vector2UInt64

type Vector2UInt64 struct {
	X, Y uint64
}

func NewVector2UInt64

func NewVector2UInt64(x uint64, y uint64) *Vector2UInt64

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL