Skip to content

Commit

Permalink
no wild casts from double to int
Browse files Browse the repository at this point in the history
  • Loading branch information
LafCorentin committed Aug 24, 2020
1 parent 4204fe2 commit c0e324e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -366,10 +366,10 @@ void CellMLZincMappingViewZincWidget::draw()

//TODO is it the best way to guess ? Maybe min is more accurate
//TODO is the cast in function below ok ??
double doubleValue = qLn(0.0015*qMax(right-left,qMax(top-bottom,farPlane-nearPlane)))*invLnNodeSizeExp;
int nodeSize= qCeil(qLn(0.0017*qMax(right-left,qMax(top-bottom,farPlane-nearPlane)))*invLnNodeSizeExp);

mEditingWidget->setWheelPosition(doubleValue);
setNodeSizes(doubleValue);
mEditingWidget->setWheelPosition(nodeSize);
setNodeSizes(nodeSize);
}

//==============================================================================
Expand Down

0 comments on commit c0e324e

Please sign in to comment.