Documentation
¶
Index ¶
- Variables
- type Matrix
- func (m *Matrix) At(i, j int) float64
- func (m *Matrix) Cofactor(i, j int) float64
- func (m *Matrix) Determinant() float64
- func (m *Matrix) Equals(n *Matrix) bool
- func (m *Matrix) Inverse() (*Matrix, error)
- func (m *Matrix) Invertible() bool
- func (m *Matrix) Minor(i, j int) float64
- func (m *Matrix) Multiply(n *Matrix) *Matrix
- func (m *Matrix) MultiplyTuple(t tuple.Tuple) tuple.Tuple
- func (m *Matrix) Submatrix(r, c int) *Matrix
- func (m *Matrix) Transpose() Matrix
Constants ¶
This section is empty.
Variables ¶
View Source
var Identity = New([]float64{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1})
Identity is a 4x4 identity matrix
Functions ¶
This section is empty.
Types ¶
type Matrix ¶
Matrix represents a NxN matrix
func (*Matrix) Determinant ¶
Determinant returns the determinant of a NxN matrix
func (*Matrix) Invertible ¶
Invertible reports if a matrix is invertible
func (*Matrix) MultiplyTuple ¶
MultiplyTuple returns the product of a matrix and tuple
Click to show internal directories.
Click to hide internal directories.