I have a float variable and it is value 2.3456533424. I want to use that variable like 2.34 or 2.345. How I change float number precision?
I want to this change use a different numeric operation. I dont want to use like string.
I have a float variable and it is value 2.3456533424. I want to use that variable like 2.34 or 2.345. How I change float number precision?
I want to this change use a different numeric operation. I dont want to use like string.
you can use setPrecision(int) where the int is the number of places you want to use.