matrix

package
v0.8.1-mateyai Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: Apache-2.0 Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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