Track My Order
Frequently Asked Questions
International Shipping Info
Mon-Fri, 9am to 12pm and
1pm to 5pm U.S. Mountain Time:
October 19, 2017
about 4 years ago
Thank you for your quick reply and for solution !
I found a solution but your solution is the right.
this is my solution:
double B = (int) (currentReading * 1000.0 ) / setting_division_value ;
double C = (B * 1000.0 + 0.5) / 1000.0 ;
double D = (C / 1000.0) * setting_division_value ;
double R = (D * 1000.0 + 0.5) / 1000.0 ;
"setting_division_value" is saved in the memory by the user.
Can anyone help me to solve this problem.
I want to round three decimals with the number assigned by a graduator 2 gr ,5 gr, 10 gr, 50 gr ,100 gr.
For example, if we have currentReading 1.251 kg and we want the accuracy of 5 gr the total weight must be displayed 1.250 and if we have currentReading 1.253 kg weight must be displayed 1.255 and so on..
Thanks in advance!
No public wish lists :(