r2

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: GPL-2.0, GPL-2.0-or-later Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Rect

type Rect struct {
	Center, Size V
}

func (*Rect) Golden

func (r *Rect) Golden(c V, a float64)

Golden rectangle with side y. y/x = (x + y)/y = math.Phi

func (*Rect) IsInside

func (r *Rect) IsInside(t V) bool

func (*Rect) Ratio

func (t *Rect) Ratio(c V, y, r float64)

func (*Rect) Square

func (r *Rect) Square(c V, y float64)

Square with side y.

type V

type V complex128

R^2 vector V (x,y) and scalar S. Vector is complex numbers for easy arithmetic.

func II

func II(x int) V

func IJ

func IJ(x, y int) V

func UU

func UU(x uint) V

func UV

func UV(x, y uint) V

func XX

func XX(x float64) V

func XY

func XY(x, y float64) V

func (V) Abs

func (x V) Abs() float64

func (V) Abs2

func (x V) Abs2() float64

func (V) Conj

func (x V) Conj() V

func (V) I

func (x V) I() int

func (V) IJ

func (x V) IJ() (int, int)

func (V) J

func (x V) J() int

func (V) U

func (x V) U() uint

func (V) UV

func (x V) UV() (uint, uint)

func (V) V

func (x V) V() uint

func (V) X

func (x V) X() float64

func (V) XY

func (x V) XY() (float64, float64)

func (V) Y

func (x V) Y() float64

Jump to

Keyboard shortcuts

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