MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / Round

Function Round

src/fmath.h:31–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template <class _Tx>
31inline _Tx Round(const _Tx& x)
32{
33 return x < static_cast<_Tx>(0) ? std::ceil(x - static_cast<_Tx>(0.5)) : std::floor(x + static_cast<_Tx>(0.5));
34}
35
36#endif
37

Callers 7

mouseOverMethod · 0.85
mapOverMethod · 0.85
addLightMethod · 0.85
distanceMethod · 0.85
ArticleStateArmorMethod · 0.85
handleMethod · 0.85
handleMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected