Project

General

Profile

This project is closed and read-only.

Bug #1515 ยป matrix-square.patch

Matrix#square? fix. - runpaint (Run Paint Run Run), 05/26/2009 05:24 AM

View differences:

lib/matrix.rb (working copy)
end
#
# Returns +true+ is this is a square matrix. See note in column_size about this
# being unreliable, though.
# Returns +true+ is this is a square matrix.
#
def square?
column_size == row_size
@rows.all?{|row| row.size == @rows.size}
end
#--
    (1-1/1)