vector

package
v0.0.0-...-07010e4 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EpsEqual

func EpsEqual(f1, f2 float64) bool

Types

type Vector2D

type Vector2D struct {
	X, Y float64
}

func V2D

func V2D(x, y float64) Vector2D

func (Vector2D) Add

func (v Vector2D) Add(w Vector2D) Vector2D

func (Vector2D) DistTo

func (v Vector2D) DistTo(w Vector2D) float64

func (Vector2D) InnerProduct

func (v Vector2D) InnerProduct(w Vector2D) float64

func (Vector2D) LeftAngleTo

func (v Vector2D) LeftAngleTo(w Vector2D) float64

func (Vector2D) Mult

func (v Vector2D) Mult(f float64) Vector2D

func (Vector2D) Norm

func (v Vector2D) Norm() float64

func (Vector2D) RightAngleTo

func (v Vector2D) RightAngleTo(w Vector2D) float64

func (Vector2D) RightAngleToXAxis

func (v Vector2D) RightAngleToXAxis() float64

func (Vector2D) RotateBy

func (v Vector2D) RotateBy(a float64) Vector2D

func (Vector2D) String

func (v Vector2D) String() string

func (Vector2D) Sub

func (v Vector2D) Sub(w Vector2D) Vector2D

Jump to

Keyboard shortcuts

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