Mercurial > hg > dmlib
annotate 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 |
rev | line source |
---|---|
888 | 1 /* |
2 * DMLib | |
3 * -- Perlin noise functionality | |
2577
04c035342960
Attribute code in dmperlin.[ch] to be heavily based on Ken Perlin's original C
Matti Hamalainen <ccr@tnsp.org>
parents:
888
diff
changeset
|
4 * Based heavily on original code (C) Copyright Ken Perlin |
04c035342960
Attribute code in dmperlin.[ch] to be heavily based on Ken Perlin's original C
Matti Hamalainen <ccr@tnsp.org>
parents:
888
diff
changeset
|
5 * Adapted and enhanced by Matti 'ccr' Hamalainen |
888 | 6 */ |
7 #ifndef DMPERLIN_H | |
8 #define DMPERLIN_H | |
9 | |
10 #include "dmlib.h" | |
11 | |
12 #ifdef __cplusplus | |
13 extern "C" { | |
14 #endif | |
15 | |
16 | |
17 #define DM_PLNS_B (0x100) | |
18 #define DM_PLNS_BM (0x0ff) | |
19 #define DM_PLNS_N (0x1000) | |
20 | |
21 typedef struct | |
22 { | |
23 int p[DM_PLNS_B + DM_PLNS_B + 2]; | |
24 DMFloat g2[DM_PLNS_B + DM_PLNS_B + 2][2]; | |
25 DMFloat g1[DM_PLNS_B + DM_PLNS_B + 2]; | |
26 } DMPerlinContext; | |
27 | |
28 | |
29 int dmPerlinInit(DMPerlinContext *ctx, const int seed); | |
2579 | 30 DMFloat dmPerlinNoise2D(const DMPerlinContext *ctx, const DMFloat x, const DMFloat y, const DMFloat alpha, const DMFloat beta, const int n); |
888 | 31 |
32 | |
33 #ifdef __cplusplus | |
34 } | |
35 #endif | |
36 | |
37 #endif // DMPERLIN_H |