Skip to content

Commit

Permalink
only define round in VS <= 2012
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro committed Sep 30, 2015
1 parent c451a4b commit bd0035f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion urdf_model_state/include/urdf_model_state/model_state.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,12 +49,14 @@
namespace urdf{

//round is not defined in C++98
//So in Visual Studio is necessary to define it
//So in Visual Studio <= 2012 is necessary to define it
#ifdef _MSC_VER
#if (_MSC_VER <= 1700)
double round(double value)
{
return (value >= 0.0f)?(floor(value + 0.5f)):(ceil(value - 0.5f));
}
#endif
#endif

class Time
Expand Down

0 comments on commit bd0035f

Please sign in to comment.