vector

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2021 License: Apache-2.0 Imports: 2 Imported by: 43

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddBuf added in v0.7.0

func AddBuf(v V, u V, b V)

func Determinant

func Determinant(v V, u V) float64

func Dot

func Dot(v V, u V) float64

func Magnitude

func Magnitude(v V) float64

func RotateBuf added in v0.7.0

func RotateBuf(theta float64, v V, b V)

func ScaleBuf added in v0.7.0

func ScaleBuf(c float64, v V, b V)

func SquaredMagnitude

func SquaredMagnitude(v V) float64

func SubBuf added in v0.7.0

func SubBuf(v V, u V, b V)

func UnitBuf added in v0.7.0

func UnitBuf(v V, b V)

func Within

func Within(v V, u V) bool

Types

type V

type V vector.V

func Add

func Add(v V, u V) V

func New

func New(x float64, y float64) *V

func Rotate

func Rotate(theta float64, v V) V

Rotate rotates the vector counterclockwise by the input angle.

func Scale

func Scale(c float64, v V) V

func Sub

func Sub(v V, u V) V

func Unit

func Unit(v V) V

func (V) X

func (v V) X() float64

func (V) Y

func (v V) Y() float64

Jump to

Keyboard shortcuts

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