DATRW++ library: seismic data I/O with multiple formats

◆ powertoscale()

short datrw::su::powertoscale ( const int &  p)

convert a decimal power to a SeismicUn*x scale value

Parameters
pexponent for the power of ten
Returns
corresponding SeismicUn*x scale value like scalco or scalel

Definition at line 474 of file sucomanager.cc.

Referenced by datrw::su::ScalCoo::adjustscale(), and datrw::su::ScalCoo::scaletopower().

475  {
476  int pp = p < 0 ? -p : p;
477  short s=static_cast<short>(std::pow(10,pp));
478  return(p<0 ? -s: s);
479  } // short powertoscale(const int& p)
Here is the caller graph for this function: