Skip to content

Commit

Permalink
docs: Fix Gaussian panic message
Browse files Browse the repository at this point in the history
  • Loading branch information
sp301415 committed May 29, 2024
1 parent 4ff61d7 commit a28dd31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion math/csprng/gaussian_sampler.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func (s *GaussianSampler[T]) normFloat64() float64 {
// Panics when stdDev < 0.
func (s *GaussianSampler[T]) Sample(stdDev float64) T {
if stdDev < 0 {
panic("negative standard deviation")
panic("standard deviation not positive")
}

u := s.normFloat64() * stdDev
Expand Down

0 comments on commit a28dd31

Please sign in to comment.