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