Skip to content

Instantly share code, notes, and snippets.

View Nikedemos's full-sized avatar

Nicodemus J. Bernards Nikedemos

View GitHub Profile
//BASED ON https://martin.ankerl.com/2007/10/04/optimized-pow-approximation-for-java-and-c-c/
public class MagicalTanhAndExpWizardry
{
//because come on
public const float TANH_CLAMP = 4F;
public static float ExpForMuggles(float x)
{
return Mathf.Exp(x);
}
@Nikedemos
Nikedemos / OpenSimplexNoise.cs
Created September 9, 2019 07:14 — forked from digitalshadow/OpenSimplexNoise.cs
OpenSimplex Noise Refactored for C#
/* OpenSimplex Noise in C#
* Ported from https://gist.github.com/KdotJPG/b1270127455a94ac5d19
* and heavily refactored to improve performance. */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.CompilerServices;
namespace NoiseTest