This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections.Generic; | |
public static class ContainerExtensions | |
{ | |
public static void SortNoAlloc<T>(this IList<T> list) where T : System.IComparable<T> | |
{ | |
if(list.Count <= 1) return; | |
QuickSort(list, 0, list.Count - 1); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float random(float2 seed) | |
{ | |
return frac(sin(dot(seed.xy, float2(12.9898, 78.233))) * 43758.5453123); | |
} | |
float noise(float2 seed) | |
{ | |
float2 i = floor(seed); | |
float2 f = frac(seed); |