Mercurial > games > semicongine
changeset 1354:8ad6e4cfcb2d
merge
author | sam <sam@basx.dev> |
---|---|
date | Fri, 27 Sep 2024 23:45:13 +0700 |
parents | 93a6d70d845f (diff) 3bd16ad0e1b9 (current diff) |
children | 67e8391ffc67 |
files | |
diffstat | 1 files changed, 6 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/semicongine/contrib/algorithms/noise.nim Thu Sep 12 17:30:23 2024 +0700 +++ b/semicongine/contrib/algorithms/noise.nim Fri Sep 27 23:45:13 2024 +0700 @@ -27,8 +27,9 @@ xinterpol = pos.x - topleft.x yinterpol = pos.y - topleft.y - return interpolate( - interpolate(topleft_dot, bottomleft_dot, yinterpol), - interpolate(topright_dot, bottomright_dot, yinterpol), - xinterpol, - ) + return + interpolate( + interpolate(topleft_dot, bottomleft_dot, yinterpol), + interpolate(topright_dot, bottomright_dot, yinterpol), + xinterpol, + ) * 0.5 + 0.5