vector

package
v0.0.0-...-e42d693 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vec2

type Vec2 struct {
	X, Y float64
}

func (Vec2) Add

func (v Vec2) Add(other Vec2) Vec2

func (Vec2) DistanceTo

func (v Vec2) DistanceTo(other Vec2) float64

func (Vec2) Div

func (v Vec2) Div(scalar float64) Vec2

func (Vec2) Length

func (v Vec2) Length() float64

func (Vec2) Limit

func (v Vec2) Limit(max float64) Vec2

func (Vec2) Mul

func (v Vec2) Mul(scalar float64) Vec2

func (Vec2) Normalize

func (v Vec2) Normalize() Vec2

func (Vec2) Sub

func (v Vec2) Sub(other Vec2) Vec2

Jump to

Keyboard shortcuts

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