cleanup some unused functions, which were exported but never used

This commit is contained in:
Marcel Märtens 2021-05-04 21:01:42 +02:00
parent 0142cf37f0
commit 76319cb260
3 changed files with 16 additions and 9 deletions

View File

@ -28,6 +28,7 @@ pub type Alt = f64;
pub type Compute = f64;
pub type Computex8 = [Compute; 8];
/* code used by sharp in future
/// Compute the water flux at all chunks, given a list of chunk indices sorted
/// by increasing height.
pub fn get_drainage(
@ -56,6 +57,7 @@ pub fn get_drainage(
});
flux
}
*/
/// Compute the water flux at all chunks for multiple receivers, given a list of
/// chunk indices sorted by increasing height and weights for each receiver.
@ -1723,7 +1725,7 @@ fn erode(
/// http://horizon.documentation.ird.fr/exl-doc/pleins_textes/pleins_textes_7/sous_copyright/010031925.pdf
///
/// See https://github.com/mewo2/terrain/blob/master/terrain.js
pub fn fill_sinks<F: Float + Send + Sync>(
pub(crate) fn fill_sinks<F: Float + Send + Sync>(
map_size_lg: MapSizeLg,
h: impl Fn(usize) -> F + Sync,
is_ocean: impl Fn(usize) -> bool + Sync,

View File

@ -9,18 +9,21 @@ mod way;
use self::erosion::Compute;
pub use self::{
diffusion::diffusion,
erosion::{
do_erosion, fill_sinks, get_drainage, get_lakes, get_multi_drainage, get_multi_rec,
get_rivers, mrec_downhill, Alt, RiverData, RiverKind,
},
location::Location,
map::{sample_pos, sample_wpos},
util::{
cdf_irwin_hall, downhill, get_horizon_map, get_oceans, local_cells, map_edge_factor,
uniform_noise, uphill, InverseCdf, ScaleBias,
},
util::get_horizon_map,
way::{Cave, Path, Way},
};
pub(crate) use self::{
erosion::{
do_erosion, fill_sinks, get_lakes, get_multi_drainage, get_multi_rec, get_rivers, Alt,
RiverData, RiverKind,
},
util::{
cdf_irwin_hall, downhill, get_oceans, local_cells, map_edge_factor, uniform_noise, uphill,
InverseCdf,
},
};
use crate::{
all::{Environment, ForestKind, TreeAttr},

View File

@ -771,6 +771,7 @@ impl NoiseFn<[f64; 4]> for HybridMulti {
}
}
/* code used by sharp in future
/// Noise function that applies a scaling factor and a bias to the output value
/// from the source function.
///
@ -810,3 +811,4 @@ impl<'a, F: NoiseFn<T> + 'a, T> NoiseFn<T> for ScaleBias<'a, F> {
#[cfg(target_os = "emscripten")]
fn get(&self, point: T) -> f64 { (self.source.get(point) * self.scale) + self.bias }
}
*/