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 0fef400 commit 414f0ae
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions src/noise.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ along with Freeminer. If not, see <http://www.gnu.org/licenses/>.

extern FlagDesc flagdesc_noiseparams[];


#if MAX_MAP_GENERATION_LIMIT > FARSCALE_LIMIT

template <typename type_scale, typename type_coord>
inline type_scale farscale(type_scale scale, type_coord z) {
return ( 1 + ( 1 - (FARSCALE_LIMIT * 1 - (fmod(fabs(z), FARSCALE_LIMIT)) ) / (FARSCALE_LIMIT * 1) ) * (scale - 1) );
Expand All @@ -57,26 +54,6 @@ inline type_scale farscale(type_scale scale, type_coord x, type_coord y, type_co
return ( 1 + ( 1 - (FARSCALE_LIMIT * 3 - fmod(fabs(x) + fabs(y) + fabs(z), FARSCALE_LIMIT*3) ) / (FARSCALE_LIMIT * 3) ) * (scale - 1) );
}

#else

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 * 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 - (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 - (fabs(x) + fabs(y) + fabs(z)) ) / (FARSCALE_LIMIT * 3) ) * (scale - 1) );
}

#endif


// Note: this class is not polymorphic so that its high level of
// optimizability may be preserved in the common use case
class PseudoRandom {
Expand Down

0 comments on commit 414f0ae

Please sign in to comment.