Merge branch 'xMAC94x/update-toolchain' into 'master'

update toolchain to `2020-02-06`

See merge request veloren/veloren!791
This commit is contained in:
Marcel 2020-02-09 22:06:45 +00:00
commit 56c4b50a27
4 changed files with 8 additions and 8 deletions

View File

@ -57,12 +57,12 @@ impl Input {
/// Whether it's the first frame this input has been in
/// its current state
pub fn is_just_pressed(&self) -> bool { (self.just_changed && self.is_pressed()) }
pub fn is_just_pressed(&self) -> bool { self.just_changed && self.is_pressed() }
/// Whether input has been in current state longer than
/// `DEFAULT_HOLD_DURATION`
pub fn is_held_down(&self) -> bool {
(self.is_pressed() && self.duration >= DEFAULT_HOLD_DURATION)
self.is_pressed() && self.duration >= DEFAULT_HOLD_DURATION
}
/// Handles logic of updating state of Input

View File

@ -1 +1 @@
nightly-2020-01-18
nightly-2020-02-06

View File

@ -574,7 +574,7 @@ impl WorldSim {
fn spring(x: f64, pow: f64) -> f64 { x.abs().powf(pow) * x.signum() }
(0.0 + alt_main
0.0 + alt_main
+ (gen_ctx
.small_nz
.get(
@ -590,7 +590,7 @@ impl WorldSim {
.mul(0.3)
.add(1.0)
.mul(0.4)
+ spring(alt_main.abs().powf(0.5).min(0.75).mul(60.0).sin(), 4.0).mul(0.045))
+ spring(alt_main.abs().powf(0.5).min(0.75).mul(60.0).sin(), 4.0).mul(0.045)
};
// Now we can compute the final altitude using chaos.
@ -669,7 +669,7 @@ impl WorldSim {
let alt_exp_max_uniform = inv_func(max_epsilon);
let erosion_factor = |x: f64| {
((inv_func(x) - alt_exp_min_uniform) / (alt_exp_max_uniform - alt_exp_min_uniform))
(inv_func(x) - alt_exp_min_uniform) / (alt_exp_max_uniform - alt_exp_min_uniform)
};
let rock_strength_div_factor = (2.0 * TerrainChunkSize::RECT_SIZE.x as f64) / 8.0;
let theta_func = |_posi| 0.4;

View File

@ -175,12 +175,12 @@ pub fn uniform_noise<F: Float + Send>(
let mut noise = (0..WORLD_SIZE.x * WORLD_SIZE.y)
.into_par_iter()
.filter_map(|i| {
(f(
f(
i,
(uniform_idx_as_vec2(i) * TerrainChunkSize::RECT_SIZE.map(|e| e as i32))
.map(|e| e as f64),
)
.map(|res| (i, res)))
.map(|res| (i, res))
})
.collect::<Vec<_>>();