Added DbU::physicalToGrid method.
This commit is contained in:
parent
61328d9c4c
commit
562cca23c7
|
@ -77,6 +77,7 @@ namespace Hurricane {
|
|||
static inline Unit db ( long value );
|
||||
static inline Unit grid ( double value );
|
||||
static inline Unit lambda ( double value );
|
||||
static inline Unit physicalToDbu ( double value, UnitPower p );
|
||||
// Precision & Resolution Managment.
|
||||
static unsigned int getPrecision ();
|
||||
static unsigned int getMaximalPrecision ();
|
||||
|
@ -135,6 +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 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; }
|
||||
|
|
|
@ -9,17 +9,13 @@
|
|||
// $Id$
|
||||
//
|
||||
// +-----------------------------------------------------------------+
|
||||
// | |
|
||||
// | C O R I O L I S |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
// | Author : Jean-Paul CHAPUT |
|
||||
// | E-mail : Jean-Paul.Chaput@asim.lip6.fr |
|
||||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Module : "./hurricane/viewer/Script.cpp" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
|
|
|
@ -2,14 +2,13 @@
|
|||
// -*- C++ -*-
|
||||
//
|
||||
// This file is part of the Coriolis Software.
|
||||
// Copyright (c) UPMC/LIP6 2008-2010, All Rights Reserved
|
||||
// Copyright (c) UPMC/LIP6 2008-2011, All Rights Reserved
|
||||
//
|
||||
// ===================================================================
|
||||
//
|
||||
// $Id$
|
||||
//
|
||||
// x-----------------------------------------------------------------x
|
||||
// | |
|
||||
// +-----------------------------------------------------------------+
|
||||
// | H U R R I C A N E |
|
||||
// | V L S I B a c k e n d D a t a - B a s e |
|
||||
// | |
|
||||
|
@ -17,10 +16,7 @@
|
|||
// | E-mail : Jean-Paul.Chaput@lip6.fr |
|
||||
// | =============================================================== |
|
||||
// | C++ Header : "./hurricane/viewer/Script.h" |
|
||||
// | *************************************************************** |
|
||||
// | U p d a t e s |
|
||||
// | |
|
||||
// x-----------------------------------------------------------------x
|
||||
// +-----------------------------------------------------------------+
|
||||
|
||||
|
||||
# ifndef __ISOBAR_SCRIPT__
|
||||
|
|
Loading…
Reference in New Issue