summaryrefslogtreecommitdiff
path: root/src/libs/din/din.h
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-12-31 12:26:05 -0800
committerVito Caputo <vcaputo@pengaru.com>2023-12-31 12:30:55 -0800
commit93bba0927f0f1d3be8be472a9f4e7312d0be380d (patch)
treeb5eab93229489efb7c5c7b897f0d08562830529d /src/libs/din/din.h
parentd9cbdaf1eda5a2116087149313b3005e7e0a57be (diff)
libs/din: constify din_t for din()
din() just samples the din_t which will always just be a read-only operation, so constify this. It might even help the compiler generate faster code for din-heavy inner loops like modules/swab uses.
Diffstat (limited to 'src/libs/din/din.h')
-rw-r--r--src/libs/din/din.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libs/din/din.h b/src/libs/din/din.h
index 97823b6..ff25fb4 100644
--- a/src/libs/din/din.h
+++ b/src/libs/din/din.h
@@ -7,6 +7,6 @@ typedef struct v3f_t v3f_t;
din_t * din_new(int width, int height, int depth, unsigned seed);
void din_free(din_t *din);
void din_randomize(din_t *din);
-float din(din_t *din, v3f_t *coordinate);
+float din(const din_t *din, v3f_t *coordinate);
#endif
© All Rights Reserved