Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » rounding to decimals implementation
rounding to decimals implementation [message #44429] Wed, 11 March 2015 11:24 Go to previous message
aftershock is currently offline  aftershock
Messages: 137
Registered: May 2008
Experienced Member

Hi all,

I have not found that in the library.

Here is the implementation.

double roundd ( double n, int decimals )
{
double p = ipow10 ( decimals );
return floor ( n*p + 0.5 ) / p;
}

A.
 
Read Message
Read Message
Previous Topic: Image DnD into Upp app
Next Topic: Bug? Directoryexists does not recognise directory if...
Goto Forum:
  


Current Time: Mon Dec 16 15:10:27 CET 2019

Total time taken to generate the page: 0.00895 seconds