Documentation ¶
Index ¶
- type Vec
- func (a Vec) Abs() Vec
- func (a Vec) Add(b Vec) Vec
- func (a Vec) AddScalar(b float64) Vec
- func (a Vec) Ceil() Vec
- func (a Vec) Clamp(b, c Vec) Vec
- func (a Vec) Cross(b Vec) float64
- func (a Vec) Div(b Vec) Vec
- func (a Vec) DivScalar(b float64) Vec
- func (a Vec) Dot(b Vec) float64
- func (a Vec) Equals(b Vec, tolerance float64) bool
- func (a Vec) LTEZero() bool
- func (a Vec) LTZero() bool
- func (a Vec) Length() float64
- func (a Vec) Length2() float64
- func (a Vec) Max(b Vec) Vec
- func (a Vec) MaxComponent() float64
- func (a Vec) Min(b Vec) Vec
- func (a Vec) MinComponent() float64
- func (a Vec) Mul(b Vec) Vec
- func (a Vec) MulScalar(b float64) Vec
- func (a Vec) Neg() Vec
- func (a Vec) Normalize() Vec
- func (a Vec) Sub(b Vec) Vec
- func (a Vec) SubScalar(b float64) Vec
- type VecSet
- type VecSetByX
- type VecSetByXY
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vec ¶
type Vec struct {
X, Y float64
}
Vec is a 2D float64 vector.
func (Vec) MaxComponent ¶
MaxComponent returns the maximum component of the vector.
func (Vec) MinComponent ¶
MinComponent returns the minimum component of the vector.
type VecSet ¶
type VecSet []Vec
VecSet is a set of 2D float64 vectors.
type VecSetByXY ¶
type VecSetByXY VecSet
VecSetByXY sorts the vector set by X then Y
func (VecSetByXY) Len ¶
func (a VecSetByXY) Len() int
func (VecSetByXY) Less ¶
func (a VecSetByXY) Less(i, j int) bool
func (VecSetByXY) Swap ¶
func (a VecSetByXY) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.