vector

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2021 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Determinant

func Determinant(v, u V) float64

func Dot

func Dot(v, u V) float64

func IsOrthogonal

func IsOrthogonal(v, u V) bool

func Magnitude

func Magnitude(a V) float64

func SquaredMagnitude

func SquaredMagnitude(a V) float64

func Within

func Within(a V, b V, tolerance float64) bool

Types

type V

type V struct {
	// contains filtered or unexported fields
}

func Add

func Add(v, u V) V

func New

func New(x, y float64) *V

func Rotate

func Rotate(theta float64, v V) V

func Scale

func Scale(s float64, v V) V

func Sub

func Sub(v, u V) V

func Unit

func Unit(a 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