]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Suggestion by Rostislav Khlebnikov: Replace call to C99 function
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 28 Apr 2009 13:36:24 +0000 (13:36 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Tue, 28 Apr 2009 13:36:24 +0000 (13:36 +0000)
'rint' with hand-written cast.

git-svn-id: https://svn.dealii.org/trunk@18767 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/base/source/data_out_base.cc

index ae9161c52f2211b841e384d33695abe264a07476..71c166b6094a1894b7ddca1d744266fb4d9f762b 100644 (file)
@@ -2944,9 +2944,9 @@ void DataOutBase::write_eps (const std::vector<Patch<dim,spacedim> > &patches,
                                         // lower left corner
          << "0 0 "
                                         // upper right corner
-         << static_cast<unsigned int>( rint((x_max-x_min) * scale ))
+         << static_cast<unsigned int>( (x_max-x_min) * scale + 0.5)
          << ' '
-         << static_cast<unsigned int>( rint((y_max-y_min) * scale ))
+         << static_cast<unsigned int>( (y_max-y_min) * scale + 0.5)
          << '\n';
       
                                       // define some abbreviations to keep

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.