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: 143
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: Fri Apr 26 01:16:59 CEST 2024

Total time taken to generate the page: 0.06473 seconds