Logo Search packages:      
Sourcecode: ktechlab version File versions  Download package

double Item::getMultiplier ( double  num  )  [static, inherited]

Returns the multiplier required to get the num up to human readable form: eg 10000 returns 0.001, etc

Definition at line 526 of file item.cpp.

Referenced by Variant::displayString(), DoubleSpinBox::getMult(), Item::getNumberPre(), DoubleSpinBox::mapTextToValue(), DoubleSpinBox::setValue(), VariableResistor::sliderValueChanged(), and VariableCapacitor::sliderValueChanged().

      if ( num == 0. ) return 1.;
      else return std::pow( 10, 3*std::floor(std::log10(std::abs(num))/3) );

Generated by  Doxygen 1.6.0   Back to index