Skip to content

Commit

Permalink
[Rust] Added clone, debug derive for FastNoiseLite (#138)
Browse files Browse the repository at this point in the history
* Added clone derive

* Added `Debug` derive
  • Loading branch information
DanielDK05 authored May 6, 2024
1 parent 722ddec commit 6fd081a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Rust/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
// Discord: Keavon (preferred) | Email: see <https://keavon.com> for the address | GitHub: Keavon (https://github.com/Keavon)

#![doc = include_str!("../README.md")]

#![cfg_attr(not(feature = "std"), no_std)]
#![allow(clippy::excessive_precision)]

Expand Down Expand Up @@ -182,15 +181,15 @@ pub enum TransformType3D {
///
/// ```rs
/// use fastnoise_lite::*;
///
///
/// // Create and configure the FastNoise object
/// let mut noise = FastNoiseLite::new();
/// noise.set_noise_type(Some(NoiseType::OpenSimplex2));
///
///
/// const WIDTH: usize = 128;
/// const HEIGHT: usize = 128;
/// let mut noise_data = [[0.; HEIGHT]; WIDTH];
///
///
/// // Sample noise pixels
/// for x in 0..WIDTH {
/// for y in 0..HEIGHT {
Expand All @@ -207,6 +206,7 @@ pub enum TransformType3D {
///
/// // Do something with this data...
/// ```
#[derive(Clone, Debug)]
pub struct FastNoiseLite {
pub seed: i32,
pub frequency: f32,
Expand Down

0 comments on commit 6fd081a

Please sign in to comment.