Constructors
constructor
- new Array2D(array: Array<Array<T>>): Array2D
Properties
Private array
array: Array<Array<T>>
Private height
height: number
Private width
width: number
Methods
forEach
- forEach(callback: (item: T, x: number, y: number) => void): void
-
Parameters
-
callback: (item: T, x: number, y: number) => void
-
- (item: T, x: number, y: number): void
-
Parameters
-
item: T
-
x: number
-
y: number
Returns void
Returns void
get
- get(x: number, y: number): T
set
- set(x: number, y: number, value: T): void
-
Parameters
-
x: number
-
y: number
-
value: T
Returns void
slice
- slice(__namedParameters: [number, number], __namedParameters: [number, number]): Array2D<T>
-
Parameters
-
__namedParameters: [number, number]
-
__namedParameters: [number, number]