Skip to content

Commit

Permalink
- fix Windows msvc build: ANSI-C please :)
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@18105 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
adrpo committed Nov 13, 2013
1 parent f2505de commit 32fc4ff
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions SimulationRuntime/c/simulation/solver/model_help.c
Expand Up @@ -1183,13 +1183,14 @@ modelica_real _event_div_real(modelica_real x1, modelica_real x2, modelica_integ
* \param [in] [x]
* \param [in] [precision]
*
* Returns a round value of x with a certain presision.
* Returns a round value of x with a certain precision.
*/
modelica_real _omc_round(modelica_real x, modelica_integer precision)
{
ASSERT(precision<20, "_omc_round fails with presision > 19");
double p = (double) pow(10, precision);
double trunc = round(x * p);
double p, trunc;
ASSERT(precision < 20, "_omc_round fails with precision > 19");
p = (double) pow(10, precision);
trunc = round(x * p);
return (modelica_real) (trunc / p);
}

0 comments on commit 32fc4ff

Please sign in to comment.