# HG changeset patch # User sam # Date 1727455513 -25200 # Node ID 8ad6e4cfcb2d42d607d9a0e9feebd6d0fd0d737e # Parent 93a6d70d845f14b0383508242f0b5d97b3d92af7# Parent 3bd16ad0e1b9985188a3396fc427f8480283191b merge diff -r 3bd16ad0e1b9 -r 8ad6e4cfcb2d semicongine/contrib/algorithms/noise.nim --- 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