Fixed qreal/double mismatch

This fixes compilation on platforms where qreal is a float (like ARM).