<html>
<body>
What Roman suggests will certainly work but why do you want to do it that
way? Five minutes work with an Excel spreadsheet gave me the following
results:<br><br>
<font face="Courier New, Courier">const float MinDelay[20] =<br>
{<br>
&nbsp;&nbsp;&nbsp; 51.0555557920,&nbsp; 111.0000004796,&nbsp;
170.9444451671,&nbsp; 230.8888898547,<br>
&nbsp;&nbsp; 290.8333345422,&nbsp; 350.7777792298,&nbsp;
410.7222239173,&nbsp; 470.6666686049,<br>
&nbsp;&nbsp; 530.6111132924,&nbsp; 590.5555579800,&nbsp;
650.5000026675,&nbsp; 710.4444473551,<br>
&nbsp;&nbsp; 770.3888920426,&nbsp; 830.3333367302,&nbsp;
890.2777814177,&nbsp; 950.2222261053,<br>
&nbsp; 1010.1666707928, 1070.1111154804, 1130.0555601680,
1190.0000048555<br>
</font>};<br><br>
OK that's only to ten decimal places, but with 8-bits it should be good
enough.<br><br>
All the best for now,<br>
John<br><br>
<br>
At 12:09 06/03/2007, you wrote:<br>
<blockquote type=cite class=cite cite="">it should be possible, but try
to avoid &quot;/&quot; and set the extra double brackets in the
formula.<br><br>
#define MINDELAY(x)&nbsp;&nbsp;&nbsp; ( ((x)) - 0.148285449) *
59.94444469<br><br>
Roman<br><br>
Sylvain Bissonnette schrieb:<br>
<blockquote type=cite class=cite cite="">Hi,<br><br>
&nbsp;&nbsp; I'm not a #define expert, I want to know if it's possible to
do this?<br><br>
MINDELAY&nbsp;&nbsp;&nbsp;&nbsp; (x - 0.148285449) / 0.016682113<br>
x can be from 1 to 20<br><br>
The result will always between 0 and 2000 (int)<br><br>
Thanks<br>
Sylvain Bissonnette<br><br>
_______________________________________________<br>
Icc-avr mailing list<br>
Icc-avr@imagecraft.com<br>
<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" eudora="autourl">
http://dragonsgate.net/mailman/listinfo/icc-avr</a><br>
</blockquote><br>
_______________________________________________<br>
Icc-avr mailing list<br>
Icc-avr@imagecraft.com<br>
<a href="http://dragonsgate.net/mailman/listinfo/icc-avr" eudora="autourl">
http://dragonsgate.net/mailman/listinfo/icc-avr</a><br><br>
</blockquote></body>
</html>