Mercurial > hg > dmlib
view src/dmperlin.h @ 2634:f3c7115cbf85 default tip
Fix verbose build echos.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Thu, 29 Feb 2024 21:47:31 +0200 |
parents | e716a2f18da0 |
children |
line wrap: on
line source
/* * DMLib * -- Perlin noise functionality * Based heavily on original code (C) Copyright Ken Perlin * Adapted and enhanced by Matti 'ccr' Hamalainen */ #ifndef DMPERLIN_H #define DMPERLIN_H #include "dmlib.h" #ifdef __cplusplus extern "C" { #endif #define DM_PLNS_B (0x100) #define DM_PLNS_BM (0x0ff) #define DM_PLNS_N (0x1000) typedef struct { int p[DM_PLNS_B + DM_PLNS_B + 2]; DMFloat g2[DM_PLNS_B + DM_PLNS_B + 2][2]; DMFloat g1[DM_PLNS_B + DM_PLNS_B + 2]; } DMPerlinContext; int dmPerlinInit(DMPerlinContext *ctx, const int seed); DMFloat dmPerlinNoise2D(const DMPerlinContext *ctx, const DMFloat x, const DMFloat y, const DMFloat alpha, const DMFloat beta, const int n); #ifdef __cplusplus } #endif #endif // DMPERLIN_H