COMP: fix for platforms on which qreal is not the same as double