Documentation
¶
Index ¶
- type Point
- type Vector
- func (v *Vector) Add(other *Vector) *Vector
- func (v *Vector) Length() float64
- func (v *Vector) Multiply(scalar float64) *Vector
- func (v *Vector) Normalize() *Vector
- func (v *Vector) Radians() float64
- func (v *Vector) Rotate(angle float64) *Vector
- func (v *Vector) String() string
- func (v *Vector) ToProto() *pb.Vector
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
Point structs holds 2D vector with int coordinates.
func NewPointFromPolar ¶
NewPointFromPolar initializes new vector form given polar coordinates.
type Vector ¶
Vector structs holds 2D vector.
func (*Vector) Multiply ¶
Multiply returns new Vector that is a product of the the vector and given scalar.
Click to show internal directories.
Click to hide internal directories.