Changeset 1816 in Sophya for trunk/SophyaExt


Ignore:
Timestamp:
Dec 16, 2001, 11:32:07 PM (24 years ago)
Author:
ansari
Message:

remplacement nint() qui n'existe que sous OSF par l_ft_nint() ds datacirclefits.cc - Reza 16/12/01

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaExt/FitsIOServer/datacirclefits.cc

    r1815 r1816  
    55   Class used to recover the circles and measures involved in a mission. The parameters needful to create a circle and the number of samples on this circle are read from a FITS data array. In addition, a function returns the measurement at a given angular position psi on the circle.
    66*/
     7
     8/* La fonction nint(double) n'existe pas partout ! */
     9static long l_ft_nint(double x)
     10{
     11return ( (x < 0.) ? (long)(x-0.5) : (long)(x+0.5) ) ;
     12}
     13
    714
    815DataCircleFits::DataCircleFits() :
     
    8390
    8491  double dtab;
    85   int ibin= nint(psi*_NMeasurements/(2.*M_PI));
     92  int ibin= l_ft_nint(psi*_NMeasurements/(2.*M_PI));
    8693  //cout << " ibin= " << ibin << ", " << psi << endl;
    8794
     
    128135    exit(0);
    129136  }
    130   int ibin= nint(psi*_NMeasurements/(2.*M_PI));
     137  int ibin= l_ft_nint(psi*_NMeasurements/(2.*M_PI));
    131138  return _mesures[ibin];
    132139}
Note: See TracChangeset for help on using the changeset viewer.