Skip to content

Commit

Permalink
[cRuntime] fix function _omc_maximumVectorNorm
Browse files Browse the repository at this point in the history
Belonging to [master]:
  - OpenModelica/OMCompiler#2459
  • Loading branch information
Willi Braun authored and OpenModelica-Hudson committed May 23, 2018
1 parent ef288f9 commit 729fcc0
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions SimulationRuntime/c/simulation/solver/omc_math.c
Expand Up @@ -807,8 +807,6 @@ _omc_scalar _omc_euclideanVectorNorm(const _omc_vector* vec)
/*! \fn _omc_scalar _omc_maximumVectorNorm(_omc_vector* vec)
*
* calculates the maximum vector norm
*
* \param [ref] [vec] !TODO: DESCRIBE ME!
*/
_omc_scalar _omc_maximumVectorNorm(const _omc_vector* vec)
{
Expand All @@ -820,7 +818,7 @@ _omc_scalar _omc_maximumVectorNorm(const _omc_vector* vec)
for (i = 1; i < vec->size; ++i)
{
tmp = fabs(vec->data[i]);
if (result > tmp)
if (result < tmp)
{
result = tmp;
}
Expand Down

0 comments on commit 729fcc0

Please sign in to comment.