= private = protected
identity(n)
Creates an n by n identity matrix.
Matrix.identity(2) => 1 0 0 1
# File lib/matrix.rb, line 211 def Matrix.identity(n) Matrix.scalar(n, 1) end