Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Dec 10, 2024
1 parent ee6128f commit 0fef400
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/noise.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@ inline type_scale farscale(type_scale scale, type_coord x, type_coord y, type_co

template <typename type_scale, typename type_coord>
inline type_scale farscale(type_scale scale, type_coord z) {
return ( 1 + ( 1 - (FARSCALE_LIMIT * 1 - (fabs(z) % FARSCALE_LIMIT) ) / (FARSCALE_LIMIT * 1) ) * (scale - 1) );
return ( 1 + ( 1 - (FARSCALE_LIMIT * 1 - (fabs(z)) ) / (FARSCALE_LIMIT * 1) ) * (scale - 1) );
}

template <typename type_scale, typename type_coord>
inline type_scale farscale(type_scale scale, type_coord x, type_coord z) {
return ( 1 + ( 1 - (FARSCALE_LIMIT * 2 - int(fabs(x) + fabs(z)) % FARSCALE_LIMIT*2 ) / (FARSCALE_LIMIT * 2) ) * (scale - 1) );
return ( 1 + ( 1 - (FARSCALE_LIMIT * 2 - (fabs(x) + fabs(z)) ) / (FARSCALE_LIMIT * 2) ) * (scale - 1) );
}

template <typename type_scale, typename type_coord>
inline type_scale farscale(type_scale scale, type_coord x, type_coord y, type_coord z) {
return ( 1 + ( 1 - (FARSCALE_LIMIT * 3 - int(fabs(x) + fabs(y) + fabs(z)) % FARSCALE_LIMIT*3 ) / (FARSCALE_LIMIT * 3) ) * (scale - 1) );
return ( 1 + ( 1 - (FARSCALE_LIMIT * 3 - (fabs(x) + fabs(y) + fabs(z)) ) / (FARSCALE_LIMIT * 3) ) * (scale - 1) );
}

#endif
Expand Down

0 comments on commit 0fef400

Please sign in to comment.