vector

package
v0.0.0-...-d6e8a04 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 3, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAdd = errors.New("Can't add the vector check and see that they have the same length")
)

Functions

This section is empty.

Types

type Vector

type Vector []float64

Vector represents a vector

func New

func New(data ...float64) Vector

New ...

func (Vector) Add

func (v Vector) Add(addvector Vector) (sum Vector, err error)

Add added two vector

func (Vector) Is_Unit

func (v Vector) Is_Unit() bool

Is_Unit return if a vector is a unit vector or not

func (Vector) Len

func (v Vector) Len() int

Len returns the lenght of a vector

func (Vector) Magnitude

func (v Vector) Magnitude() float64

Magnitude computes the Magnitude of the vector

func (Vector) Scalar

func (v Vector) Scalar(number float64) Vector

Scalar ..

func (Vector) Sub

func (v Vector) Sub(addvector Vector) (sum Vector, err error)

Sub subtracts two vector

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL