Missing factor in physicalToDbu conversion.

This commit is contained in:
Damien Dupuis 2011-02-24 13:11:11 +00:00
parent 562cca23c7
commit 4c2f16a4fe
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ namespace Hurricane {
inline DbU::Unit DbU::db ( long value ) { return value; }
inline DbU::Unit DbU::grid ( double value ) { return (long)rint( value/_resolution ); }
inline DbU::Unit DbU::lambda ( double value ) { return grid(value*_gridsPerLambda); }
inline DbU::Unit DbU::physicalToDbu ( double value, UnitPower p ) { return (long)rint((value*getUnitPower(p))/_physicalsPerGrid); }
inline DbU::Unit DbU::physicalToDbu ( double value, UnitPower p ) { return grid((value*getUnitPower(p))/_physicalsPerGrid); }
inline long DbU::getDb ( DbU::Unit u ) { return u; }
inline double DbU::getGrid ( DbU::Unit u ) { return _resolution*(double)u; }
inline double DbU::getGrid ( double u ) { return _resolution*u; }