From 4c2f16a4fe19918cbfd0c44723a0cbf44182e594 Mon Sep 17 00:00:00 2001 From: Damien Dupuis Date: Thu, 24 Feb 2011 13:11:11 +0000 Subject: [PATCH] Missing factor in physicalToDbu conversion. --- 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 a8344fa2..299de0b9 100644 --- a/hurricane/src/hurricane/hurricane/DbU.h +++ b/hurricane/src/hurricane/hurricane/DbU.h @@ -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; }