pub struct Runner { /* private fields */ }
Expand description
A runner to run the algorithm.
Implementations§
Source§impl Runner
impl Runner
Sourcepub fn ds(&mut self) -> Output
pub fn ds(&mut self) -> Output
Run the Diamond-square algorithm with a default rng. Use rand::rngs::ThreadRng internally.
Sourcepub fn ds_with_rng(&mut self, rng: &mut impl Rng) -> Output
pub fn ds_with_rng(&mut self, rng: &mut impl Rng) -> Output
Run the Diamond-square algorithm with given rng.
Sourcepub fn set_depth(&mut self, depth: f32)
pub fn set_depth(&mut self, depth: f32)
Set the depth. The value of each pixel will be within 0~depth. Default: 2000.0.
Sourcepub fn set_height(&mut self, height: usize)
pub fn set_height(&mut self, height: usize)
Set the height of the map. Must be larger than 1. Default: 129.
Auto Trait Implementations§
impl Freeze for Runner
impl RefUnwindSafe for Runner
impl Send for Runner
impl Sync for Runner
impl Unpin for Runner
impl UnwindSafe for Runner
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more