Documentation ¶
Overview ¶
Package vector provides vector functions
Index ¶
- type Vector
- func (v *Vector) Add(o *Vector) *Vector
- func (v *Vector) AngleTo(other *Vector) float64
- func (v *Vector) Length() float64
- func (v *Vector) Mult(scalar float64) *Vector
- func (v *Vector) Normalize() *Vector
- func (v *Vector) Rotate(phi float64) *Vector
- func (v *Vector) RotateAround(phi float64, o *Vector) *Vector
- func (v *Vector) Sub(o *Vector) *Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Vector ¶
type Vector struct {
X, Y float64
}
Vector represents a point in space
func (*Vector) RotateAround ¶
RotateAround rotates a Vector about another Vector and returns v for chaining
Click to show internal directories.
Click to hide internal directories.