scale to given scaling factor as defined by decimal power
Definition at line 238 of file sucomanager.cc.
References coo, DATRW_assert, DATRW_report_assert, power(), datrw::su::powertoscale(), and scale.
Referenced by datrw::su::Coordinates::equalizescaling(), and set().
240 int pd=this->
power()-p;
244 int fac=std::pow(10,-pd);
245 vnew=
static_cast<int>(std::floor(this->
coo/fac));
246 vcmp=
static_cast<int>(std::floor(vnew*fac));
250 int fac=std::pow(10,pd);
251 vnew=std::floor(this->
coo*fac);
252 vcmp=
static_cast<int>(std::floor(vnew/fac));
255 "WARNING ScalCoo::scaletopower will truncate " 258 << helper::MyOutputFormat() << this->
coo <<
259 " value will be " << vcmp);
263 "ERROR (ScalCoo::scaletopower): illegal scale value!");
#define DATRW_assert(C, M)
Check an assertion and report by throwing an exception.
short scale
scale like scalco
short powertoscale(const int &p)
convert a decimal power to a SeismicUn*x scale value
int power() const
return decimal power of scaling factor
#define DATRW_report_assert(C, M)
Check an assertion and report only.