Skip to content

Latest commit

 

History

History
67 lines (34 loc) · 859 Bytes

File metadata and controls

67 lines (34 loc) · 859 Bytes

Home > @josh-brown/vector > MatrixBuilder > identity

MatrixBuilder.identity() method

Constructs a size x size identity matrix

Signature:

identity(size: number): M;

Parameters

Parameter

Type

Description

size

number

The dimension of the vector space for which the new matrix is the identity

Returns:

M

The new matrix

Example

const I3 = matrixBuilder.identity(3);

// [ 1 0 0 ]
// [ 0 1 0 ]
// [ 0 0 1 ]