Commit 240246e9 authored by thomas.forbriger's avatar thomas.forbriger
Browse files

libpsdxx [WP]: check values of function parameters

parent 3180510e
......@@ -81,6 +81,8 @@ namespace psd {
unsigned int& n_per_decade)
{
PSDXX_assert(n_per_decade>0, "must be positive");
PSDXX_assert(nsamples>0, "must be positive");
PSDXX_assert(df>0, "must be positive");
double logfac=std::pow(10.,1./n_per_decade);
double c=1./(logfac-1.);
c=c<1.? 1. : c;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment