This repository has been archived on 2021-12-06. You can view files and clone it, but cannot push or open issues or pull requests.
raylib-test/include/OpenSimplex2F.h

27 lines
No EOL
567 B
C

typedef struct
{
int xsv, ysv;
double dx, dy;
} LatticePoint2D;
typedef struct
{
double dx, dy;
} Grad2;
typedef struct
{
short *perm;
Grad2 *permGrad2;
} OpenSimplexGradients;
typedef struct
{
Grad2 *GRADIENTS_2D;
LatticePoint2D **LOOKUP_2D;
} OpenSimplexEnv;
OpenSimplexEnv *initOpenSimplex();
OpenSimplexGradients *newOpenSimplexGradients(OpenSimplexEnv *ose, long seed);
double noise2(OpenSimplexEnv *ose, OpenSimplexGradients *osg, double x, double y);
double noise2_XBeforeY(OpenSimplexEnv *ose, OpenSimplexGradients *osg, double x, double y);