Documentation
¶
Index ¶
- func Args2Map() map[string]string
- func CalRadiansPos[T Numeric](cx, cy, r, angleDegrees T) (x, y T)
- func Contains(all []string, zhi ...string) bool
- func DistanceSqrV2[T Numeric](a Vec2[T], b Vec2[T]) T
- func DistanceV2[T Numeric](a Vec2[T], b Vec2[T]) T
- func If[T any](b bool, t, f T) T
- type Numeric
- type Vec2
- func AddArrayV2[T Numeric](vs []Vec2[T], dv Vec2[T]) []Vec2[T]
- func AddV2[T Numeric](a, b Vec2[T]) Vec2[T]
- func LerpUnclampedV2[T Numeric](a, b Vec2[T], t T) Vec2[T]
- func LerpV2[T Numeric](a, b Vec2[T], t T) Vec2[T]
- func MultiplyV2[T Numeric](v Vec2[T], scalars []T) []Vec2[T]
- func NegativeInfinityV2[T Numeric]() Vec2[T]
- func NewVec2[T Numeric](x, y T) Vec2[T]
- func PositiveInfinityV2[T Numeric]() Vec2[T]
- func SubV2[T Numeric](a, b Vec2[T]) Vec2[T]
- func XAxisV2[T Numeric]() Vec2[T]
- func XYAxisV2[T Numeric]() Vec2[T]
- func YAxisV2[T Numeric]() Vec2[T]
- func ZeroV2[T Numeric]() Vec2[T]
- func (this *Vec2[T]) Add(v Vec2[T])
- func (this *Vec2[T]) Clone() Vec2[T]
- func (this *Vec2[T]) Divide(scalar T)
- func (this *Vec2[T]) Dot(v Vec2[T]) T
- func (this *Vec2[T]) Equal(v Vec2[T]) bool
- func (this *Vec2[T]) Length() float32
- func (this *Vec2[T]) Magnitude() T
- func (this *Vec2[T]) Multiply(scalar T)
- func (this *Vec2[T]) Normalize()
- func (this *Vec2[T]) Normalized() Vec2[T]
- func (this *Vec2[T]) Scale(v Vec2[T])
- func (this *Vec2[T]) ScaleToLength(newLength T)
- func (this *Vec2[T]) ScaledToLength(newLength T) Vec2[T]
- func (this *Vec2[T]) Set(x, y T)
- func (this *Vec2[T]) SqrMagnitude() T
- func (this *Vec2[T]) Sub(v Vec2[T])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalRadiansPos ¶
func CalRadiansPos[T Numeric](cx, cy, r, angleDegrees T) (x, y T)
Types ¶
type Numeric ¶
type Numeric interface { constraints.Integer | constraints.Float }
type Vec2 ¶
type Vec2[T Numeric] struct { X T `json:"x"` Y T `json:"y"` }
func LerpUnclampedV2 ¶
func MultiplyV2 ¶
func NegativeInfinityV2 ¶
func PositiveInfinityV2 ¶
Click to show internal directories.
Click to hide internal directories.