From 7f9c707871f53bd98ff389538efd00478cbd3abf Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 15 Oct 2009 14:06:06 +0000 Subject: [PATCH] * ./hurricane/src/hurricane : - Bug: In DbU, do not multiply by _physicalPerGrid in getGrid(), was causing all coordinates to appear as zero... --- hurricane/src/hurricane/hurricane/DbU.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hurricane/src/hurricane/hurricane/DbU.h b/hurricane/src/hurricane/hurricane/DbU.h index 94a51378..e6605c12 100644 --- a/hurricane/src/hurricane/hurricane/DbU.h +++ b/hurricane/src/hurricane/hurricane/DbU.h @@ -131,7 +131,7 @@ namespace Hurricane { inline DbU::Unit DbU::grid ( double value ) { return (long)rint( value/_resolution ); } inline DbU::Unit DbU::lambda ( double value ) { return grid(value*_gridsPerLambda); } inline long DbU::getDb ( DbU::Unit u ) { return u; } - inline double DbU::getGrid ( DbU::Unit u ) { return _physicalsPerGrid*_resolution*(double)u; } + inline double DbU::getGrid ( DbU::Unit u ) { return _resolution*(double)u; } inline double DbU::getLambda ( DbU::Unit u ) { return getGrid(u)/_gridsPerLambda; } inline double DbU::getPhysical ( DbU::Unit u, UnitPower p ) { return (_physicalsPerGrid*_resolution*(double)u)/getUnitPower(p); } inline void DbU::setStringMode ( unsigned int mode ) { _stringMode = mode; }