Skip to content

Instantly share code, notes, and snippets.

View Llama-W-2Ls's full-sized avatar

Saifur-Rahman Llama-W-2Ls

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