matrix

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2019 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package matrix has functions to work with matrices.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Matrix4

type Matrix4 [16]float32

Matrix4 is a 4x4 matrix.

func Ortho

func Ortho(width, height, depth float32) Matrix4

Ortho creates a orthographic projection matrix.

func Rotation

func Rotation(radians float32) Matrix4

Rotation creates a rotation matrix.

func Scale

func Scale(sx, sy, sz float32) Matrix4

Scale creates a scale matrix.

func Translation

func Translation(x, y, z float32) Matrix4

Translation creates a translation matrix.

func (Matrix4) Mult

func (m Matrix4) Mult(n Matrix4) Matrix4

Mult returns a fresh matrix that is the product of the receiver and the argument.

func (Matrix4) String

func (m Matrix4) String() string

Jump to

Keyboard shortcuts

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