Documentation ¶
Index ¶
- Variables
- func Equals(v1, v2 Vect) bool
- type Float
- func Cross(a, b Vect) Float
- func CrossVV(a, b Vect) Float
- func Dist(v1, v2 Vect) Float
- func DistSqr(v1, v2 Vect) Float
- func Dot(v1, v2 Vect) Float
- func FAbs(a Float) Float
- func FClamp(val, min, max Float) Float
- func FMax(a, b Float) Float
- func FMin(a, b Float) Float
- func Length(v Vect) Float
- func LengthSqr(v Vect) Float
- type Vect
- func Add(v1, v2 Vect) Vect
- func Clamp(v Vect, l Float) Vect
- func CrossFV(s Float, a Vect) Vect
- func CrossVF(a Vect, s Float) Vect
- func FromAngle(angle Float) Vect
- func Lerp(v1, v2 Vect, s Float) Vect
- func Max(v1, v2 Vect) (out Vect)
- func Min(v1, v2 Vect) (out Vect)
- func Mult(v1 Vect, s Float) Vect
- func Normalize(v Vect) Vect
- func Perp(v Vect) Vect
- func Sub(v1, v2 Vect) Vect
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Vector_Zero = Vect{0, 0}
)
Functions ¶
Types ¶
type Vect ¶
type Vect struct {
X, Y Float
}
basic 2d vector.
func CrossFV ¶
cross product between a float64 and a vector. Not the same as CrossVD result = {-s * a.Y, s * a.X}
func Max ¶
returns a new vector with its x/y values set to the bigger one from the two input values. e.g. Min({2, 10}, {8, 3}) would return {2, 3}
func Min ¶
func Min(v1, v2 Vect) Vect { return INLI_Min(v1, v2) }
func Max(v1, v2 Vect) Vect { return INLI_Max(v1, v2) }
func (Vect) MarshalJSON ¶
func (*Vect) UnmarshalJSON ¶
Click to show internal directories.
Click to hide internal directories.