summaryrefslogtreecommitdiff
path: root/inc/Select3D_Macro.hxx
blob: 574357b44a285fe4829de4faf711664eeaea0701 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#ifndef _Select3D_Macro_HeaderFile
#define _Select3D_Macro_HeaderFile

#include <Standard_ShortReal.hxx>

// Safe conversion of Standard_ShortReal(float) to Standard_Real(double)
inline Standard_ShortReal DToF (Standard_Real a) 
{
  return a > ShortRealLast()  ? ShortRealLast()  :
         a < ShortRealFirst() ? ShortRealFirst() : (Standard_ShortReal)a;
}

#endif