math

package
v0.0.0-...-963f1c7 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Vector

type Vector struct {
	X float64
	Y float64
}

func NewVector

func NewVector(x, y float64) Vector

func VectorFromCollision2d

func VectorFromCollision2d(v collision2d.Vector) Vector

func VectorFromEvent

func VectorFromEvent(event events.Event) Vector

func VectorFromPixel

func VectorFromPixel(v pixel.Vec) Vector

func ZeroVector

func ZeroVector() Vector

func (Vector) Add

func (vec Vector) Add(other Vector) Vector

func (Vector) Diff

func (vec Vector) Diff(other Vector) Vector

func (Vector) Dist

func (vec Vector) Dist(other Vector) float64

func (Vector) Mid

func (vec Vector) Mid(other Vector) Vector

func (Vector) Scale

func (vec Vector) Scale(factor float64) Vector

func (*Vector) String

func (v *Vector) String() string

func (*Vector) ToCollision2d

func (v *Vector) ToCollision2d() collision2d.Vector

func (*Vector) ToPixel

func (v *Vector) ToPixel() pixel.Vec

Jump to

Keyboard shortcuts

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