Showing posts with label float. Show all posts
Showing posts with label float. Show all posts

Sep 21, 2016

Roundoff Double/Float values to any decimal points

            While working with android apps many of the time the requirement comes up were we need to round off the decimal values to a specific decimal points. Well thats not a big deal and as u migth have been thinking there should be just some simple method that we can call to round off our values directly to the required format.



            But the thing is rounding off this double values is not hard its justa little tricky. It had surely wasted almost my day finding the easiest method to do it but finally i had to end my search with some simple mathmatical calculation.