vec

package module
v0.0.0-...-686b8eb Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2021 License: MIT Imports: 2 Imported by: 1

README

vec

2d vector math

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dist

func Dist(v, w Value) float64

func Intersects

func Intersects(r, s Rect) bool

func PointwiseGreater

func PointwiseGreater(v, w Value) bool

func PointwiseGreaterEquals

func PointwiseGreaterEquals(v, w Value) bool

func PointwiseLess

func PointwiseLess(v, w Value) bool

func PointwiseLessEquals

func PointwiseLessEquals(v, w Value) bool

func Touches

func Touches(r, s Rect) bool

Types

type Mass

type Mass struct {
	Sum Value
	N   int
}

func Combine

func Combine(m, n Mass) Mass

func Subtract

func Subtract(m, n Mass) Mass

func (Mass) Center

func (m Mass) Center() Value

type Rect

type Rect [2]Value

func Inf

func Inf() Rect

func Intersection

func Intersection(r, s Rect) Rect

func (Rect) Area

func (r Rect) Area() float64

func (Rect) Bottom

func (r Rect) Bottom() float64

func (Rect) Contains

func (r Rect) Contains(v Value) bool

func (Rect) Dim

func (r Rect) Dim() Value

func (Rect) IsValid

func (r Rect) IsValid() bool

func (Rect) Left

func (r Rect) Left() float64

func (Rect) NE

func (r Rect) NE() Value

func (Rect) NW

func (r Rect) NW() Value

func (Rect) Right

func (r Rect) Right() float64

func (Rect) SE

func (r Rect) SE() Value

func (Rect) SW

func (r Rect) SW() Value

func (Rect) Top

func (r Rect) Top() float64

func (Rect) Touches

func (r Rect) Touches(v Value) bool

type Value

type Value complex128

func Imag

func Imag(scalar float64) Value

func NaN

func NaN() Value

func NewValue

func NewValue(re, im float64) Value

func PointwiseMax

func PointwiseMax(v, w Value) Value

func PointwiseMin

func PointwiseMin(v, w Value) Value

func PointwiseRemainder

func PointwiseRemainder(v, w Value) Value

func Real

func Real(scalar float64) Value

func Scalar

func Scalar(scalar float64) Value

func (Value) IsNaN

func (v Value) IsNaN() bool

func (Value) R

func (v Value) R() float64

func (Value) Scale

func (v Value) Scale(scalar float64) Value

func (Value) Unit

func (v Value) Unit() Value

func (Value) X

func (v Value) X() float64

func (Value) Y

func (v Value) Y() float64

func (Value) Θ

func (v Value) Θ() float64

Jump to

Keyboard shortcuts

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