diff options
Diffstat (limited to 'src/modules/meta2d/v2f.h')
-rw-r--r-- | src/modules/meta2d/v2f.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/meta2d/v2f.h b/src/modules/meta2d/v2f.h index 088772d..8483f00 100644 --- a/src/modules/meta2d/v2f.h +++ b/src/modules/meta2d/v2f.h @@ -281,8 +281,8 @@ static inline v2f_t * v2f_trilerp(v2f_t *res, const v2f_t *aaa, const v2f_t *aba static inline v2f_t _v2f_rand(unsigned *seedp, const v2f_t *min, const v2f_t *max) { return (v2f_t){ - .x = min->x + (float)rand_r(seedp) * (1.f/RAND_MAX) * (max->x - min->x), - .y = min->y + (float)rand_r(seedp) * (1.f/RAND_MAX) * (max->y - min->y), + .x = min->x + (float)rand_r(seedp) * (1.f/(float)RAND_MAX) * (max->x - min->x), + .y = min->y + (float)rand_r(seedp) * (1.f/(float)RAND_MAX) * (max->y - min->y), }; } |