matrix

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DegToRad = math.Pi / 180
	RadToDeg = 180 / math.Pi
)

Variables

View Source
var IdentMatrix = Matrix{{1, 0, 0}, {0, 1, 0}, {0, 0, 1}}

Functions

This section is empty.

Types

type Matrix

type Matrix [3][3]float64

func CalcRotateAndTranslateTransformMatrix

func CalcRotateAndTranslateTransformMatrix(r, dx, dy float64) Matrix

CalcRotateAndTranslateTransformMatrix returns a transform matrix that rotates and translates.

func CalcRotateTransformMatrix

func CalcRotateTransformMatrix(rot float64, bb *types.Rectangle) Matrix

CalcRotateTransformMatrix returns a transform matrix that rotates only.

func CalcTransformMatrix

func CalcTransformMatrix(sx, sy, sin, cos, dx, dy float64) Matrix

CalcTransformMatrix returns a full transform matrix.

func (Matrix) Multiply

func (m Matrix) Multiply(n Matrix) Matrix

Multiply calculates the product of two matrices.

func (Matrix) String

func (m Matrix) String() string

func (Matrix) Transform

func (m Matrix) Transform(p types.Point) types.Point

Transform applies m to p.

Jump to

Keyboard shortcuts

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