mirror of
https://github.com/atom/atom.git
synced 2026-02-09 06:05:11 -05:00
Point.toEqual will return true if it matches an array
`new Point(1,2)` is equivalent to `[1,2]`.
This commit is contained in:
@@ -14,7 +14,10 @@ class Point
|
||||
constructor: (@row, @column) ->
|
||||
|
||||
isEqual: (other) ->
|
||||
@row == other.row && @column == other.column
|
||||
if other instanceof Array
|
||||
@row == other[0] and @column == other[1]
|
||||
else
|
||||
@row == other.row and @column == other.column
|
||||
|
||||
compare: (other) ->
|
||||
if @row > other.row
|
||||
|
||||
Reference in New Issue
Block a user