@datatypes/matrix
Class for 4x4 row-major matrices for transformations in 3D
Last updated 3 years ago by datatypes .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @datatypes/matrix 
SYNC missed versions from official npm registry.

Matrix

Class for 4 by 4 row-major matrices for transformations in 3D.

Installation

npm install --save @datatypes/matrix

Usage

import Matrix from '@datatypes/matrix'

const matrixA = Matrix.fromRows([
	[1, 2, 3],
	[4, 5, 6],
	[7, 8, 9]
])
const matrixB = Matrix.fromRows([
	[ 7,  8],
	[ 9, 10],
	[11, 12]
])

console.log(
	matrixA
		.multiply(matrixB)
		.toRows()
)

Output:

[
	[ 58,  64],
	[139, 154],
	[220, 244]
]

For a more detailed listing of available features check out the tests.

Current Tags

  • 0.1.0                                ...           latest (3 years ago)

1 Versions

  • 0.1.0                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 1
This Month 1
Last Day 0
Last Week 0
Last Month 3
Dependencies (1)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |