Skip to content

Commit

Permalink
Added setter for whitenoise seed
Browse files Browse the repository at this point in the history
  • Loading branch information
CorvusPrudens committed Sep 14, 2023
1 parent 0b23cbb commit a8e0e48
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Source/Noise/whitenoise.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ class WhiteNoise
return (randseed_ * coeff_) * amp_;
}

/** sets the seed (and corrects a seed of 0 to 1) */
inline void SetSeed(int32_t s) { randseed_ = s == 0 ? 1 : s; }

private:
static constexpr float coeff_ = 4.6566129e-010f;
float amp_;
Expand Down

0 comments on commit a8e0e48

Please sign in to comment.