1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #ifndef OPEN_SIMPLEX_NOISE_H__
- #define OPEN_SIMPLEX_NOISE_H__
- #if ((__GNUC_STDC_INLINE__) || (__STDC_VERSION__ >= 199901L))
- #include <stdint.h>
- #define INLINE inline
- #elif (defined (_MSC_VER) || defined (__GNUC_GNU_INLINE__))
- #include <stdint.h>
- #define INLINE __inline
- #else
-
- #define INLINE
- #endif
- #ifdef __cplusplus
- extern "C" {
- #endif
- struct osn_context {
- int16_t perm[256];
- int16_t permGradIndex3D[256];
- };
- int open_simplex_noise(int64_t seed, struct osn_context *ctx);
- void open_simplex_noise_free(struct osn_context *ctx);
- double open_simplex_noise2(struct osn_context *ctx, double x, double y);
- double open_simplex_noise3(struct osn_context *ctx, double x, double y, double z);
- double open_simplex_noise4(struct osn_context *ctx, double x, double y, double z, double w);
- #ifdef __cplusplus
- }
- #endif
- #endif
|