0022819: Redesign of OpenGl driver
[occt.git] / src / Select3D / Select3D_Macro.hxx
CommitLineData
7fd59977 1#ifndef _Select3D_Macro_HeaderFile
2#define _Select3D_Macro_HeaderFile
3
4#include <Standard_ShortReal.hxx>
5
6// Safe conversion of Standard_ShortReal(float) to Standard_Real(double)
7inline Standard_ShortReal DToF (Standard_Real a)
8{
9 return a > ShortRealLast() ? ShortRealLast() :
10 a < ShortRealFirst() ? ShortRealFirst() : (Standard_ShortReal)a;
11}
12
13#endif