PathStrokeRenderer::initializePoints(): use float division
The (example) code used a real to hold 360 / 7, which is of course 51, discarding the 3/7 that was most likely meant to be kept. Noticed by Coverity (CID 22364). Use 360.0 instead of 360 to get more accurate results. Change-Id: Ifdfbb932589d8ea728710e8b656af651c9f8a7d2 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This commit is contained in:
parent
89765ced6e
commit
178ab88562
@ -477,7 +477,7 @@ void PathStrokeRenderer::initializePoints()
|
||||
m_vectors.clear();
|
||||
|
||||
QMatrix m;
|
||||
qreal rot = 360 / count;
|
||||
qreal rot = 360.0 / count;
|
||||
QPointF center(width() / 2, height() / 2);
|
||||
QMatrix vm;
|
||||
vm.shear(2, -1);
|
||||
|
Loading…
Reference in New Issue
Block a user