matrix

package
v0.35.2 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Overview

Package matrix provides support for common matrix maths operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dot added in v0.13.0

func Dot(v1, v2 Vector3) float64

Dot returns the dot product between two vectors.

Types

type Matrix3

type Matrix3 [3]Vector3

Matrix3 represents a 3x3 matrix of 3 column vectors.

func (Matrix3) Inverse

func (m Matrix3) Inverse() Matrix3

Inverse returns the inverse of this matrix, panicking if one does not exist.

func (Matrix3) MulM added in v0.13.0

func (m Matrix3) MulM(o Matrix3) Matrix3

MulM returns the result of multiplying this matrix by another.

func (Matrix3) MulV

func (m Matrix3) MulV(v Vector3) Vector3

MulV returns the result of multiplying this matrix by a vector.

func (Matrix3) Transpose added in v0.13.0

func (m Matrix3) Transpose() Matrix3

type Vector3

type Vector3 [3]float64

Vector3 represents a 3-element vector.

func (Vector3) MulS

func (v Vector3) MulS(s float64) Vector3

MulS returns the result of multiplying this vector by a scalar.

Jump to

Keyboard shortcuts

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