the game where you go into mines and start crafting! but for consoles (forked directly from smartcmd's github)
at master 40 lines 974 B view raw
1#pragma once 2 3class SimplexNoise 4{ 5private: 6 static int grad3[12][3]; 7 8 int *p; 9 10 static double F2; 11 static double G2; 12 static double F3; 13 static double G3; 14 15public: 16 double scale; 17 double xo, yo, zo; 18 19 SimplexNoise(); 20 SimplexNoise(Random *random); 21 void init(Random *random); 22 ~SimplexNoise(); 23 24 // This method is a *lot* faster than using (int)Math.floor(x) 25private: 26 static int fastfloor(double x); 27 static double dot(int *g, double x, double y); 28 static double dot(int *g, double x, double y, double z); 29 30 // 2D simplex noise 31public: 32 double getValue(double xin, double yin); 33 34 // 3D simplex noise 35 double getValue(double xin, double yin, double zin); 36 37 void add(doubleArray buffer, double _x, double _y, int xSize, int ySize, double xs, double ys, double pow); 38 void add(doubleArray buffer, double _x, double _y, double _z, int xSize, int ySize, int zSize, double xs, double ys, double zs, double pow); 39 40};