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 » Community » Newbie corner » display approximation...
Re: display approximation... [message #35751 is a reply to message #35750] Fri, 16 March 2012 12:31 Go to previous message
omari is currently offline  omari
Messages: 276
Registered: March 2010
Experienced Member
Hello ,

you can try that:

use dl.Add(key, value);

dl.Clear();
for(int i=1; i<=value; ++i)
{
        double k= value/i;
	if ( k > 5 && k < 45 )
	{
	String s = Format("%.02f", k); // convert to string 
        //double StrDbl(const char *s);// back to double
        dl.Add(k, s);
	}
}


then to get the DropList value: use GetKey()

double d = fabs((double)dl.GetKey(i) - 17);





regards
omari.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Sizeable().Zoomable()
Next Topic: LogPos (and Logc) - what does it mean?
Goto Forum:
  


Current Time: Mon May 12 15:32:50 CEST 2025

Total time taken to generate the page: 0.02981 seconds