geometry

package
v0.0.0-...-883f3e4 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2023 License: MPL-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 Mat

type Mat [2][3]float64

func Identity

func Identity() Mat

func Scale

func Scale(a float64) Mat

func Translation

func Translation(offset Vec) Mat

func (Mat) Apply

func (m Mat) Apply(v Vec) Vec

func (Mat) Compose

func (m Mat) Compose(o Mat) Mat

func (Mat) Invert

func (m Mat) Invert() Mat

func (Mat) String

func (m Mat) String() string

func (Mat) Zero

func (m Mat) Zero() bool

type Rect

type Rect struct{ Min, Max Vec }

func R

func R(x, y, w, h float64) Rect

func (Rect) Center

func (r Rect) Center() Vec

func (Rect) H

func (r Rect) H() float64

func (Rect) W

func (r Rect) W() float64

type Vec

type Vec struct{ X, Y float64 }

func V

func V(x, y float64) Vec

func (Vec) Add

func (v Vec) Add(o Vec) Vec

func (Vec) Scaled

func (v Vec) Scaled(s float64) Vec

func (Vec) Sub

func (v Vec) Sub(o Vec) Vec

Jump to

Keyboard shortcuts

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