Skip to content

Commit 56a519d

Browse files
committed
Fix error message
1 parent caa487a commit 56a519d

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/fixed-2d-array.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ var Fixed2DArray = function Fixed2DArray(width,height,defaultValue) {
1616
};
1717

1818
/**
19-
* Throws an Error if the given coordinates are invalid
19+
* Throws an Error if the given coordinate is invalid
2020
*/
2121
Fixed2DArray.prototype.validateCoords = function(x,y) {
2222
if(x<0 || y<0 || x>=this._width || y>=this._height) {
23-
throw new Error('fixed-2d-array: the coordinates ('+x+'/'+y+') ' +
24-
'are not valid in this Grid.' +
25-
' The grid size is ('+this._width+'/'+this._height+')');
23+
throw new Error('fixed-2d-array: the coordinate ('+x+'/'+y+') ' +
24+
'are not valid.' +
25+
' The size of this array is ('+this._width+'/'+this._height+')');
2626
}
2727
};
2828

2929
/**
30-
* Returns the coresponding value for the coordinates
30+
* Returns the coresponding value for the coordinate
3131
*/
3232
Fixed2DArray.prototype.get = function(x,y) {
3333
this.validateCoords(x,y);
3434
return this._grid[x][y];
3535
};
3636

3737
/**
38-
* Sets the value for the coresponding coorinates
38+
* Sets the value for the coresponding coorinate
3939
*/
4040
Fixed2DArray.prototype.set = function(x,y,val) {
4141
this.validateCoords(x,y);
@@ -52,7 +52,7 @@ Fixed2DArray.prototype.set = function(x,y,val) {
5252
* [ ][*][*][*][ ]
5353
* [ ][ ][ ][ ][ ]
5454
*
55-
* the given coordinates are marked with an `X`
55+
* the given coordinate is marked with an `X`
5656
* the function will return an array containing
5757
* the values for the fields maked with an `*`
5858
*/

0 commit comments

Comments
 (0)