PDA

View Full Version : set float precision



saman_artorious
29th May 2013, 07:37
application outpus 1.02122e-38
to get it to 1.02 I added


lcd.display(QString::number(digit, 'f', 2));

unfortunately, now it outputs 00.0

what am I missing?

Lesiok
29th May 2013, 08:08
You are missing that 1.02122e-38 is very small number. It is almost 0 not 1.02.