Skip to content

Instantly share code, notes, and snippets.

View sm03854's full-sized avatar

Saifur-Rahman Mohammed sm03854

View GitHub Profile
@andrew-raphael-lukasik
andrew-raphael-lukasik / Array2DView.cs
Last active October 10, 2021 08:39
tiny facade struct that provides [x,y] indexer accessors for arrays
// src* = https://gist.github.com/andrew-raphael-lukasik/b1cba7b10407c7540e33f1c0a9930746
using UnityEngine;
public struct Array2DView <T>
{
public T[] array;
public int width, height;
public T this [ int i ]
{
get