<html><head><style type="text/css"><!-- DIV {margin:0px} --></style></head><body><div style="font-family:times new roman, new york, times, serif;font-size:12pt"><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">----- Message d'origine ----<br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">De : Bill Spitzak <spitzak@d2.com><br><br><div>>Why not put the clamping and conversion into the same code? This would <br>>if (f <= 0) x = 0; else if (f < 1) x = (int)(f*65535); else x = 65535;<br>I agree, but wouln't it be better to mult. by 65536 instead of 65536 as follow:<br>>if (f <= 0) x = 0; else if (f < 1) x = (int)(f*65536); else x = 65535;<br>because otherwise even values very near from 1.0 (like 1.0- 1.e-9) would be 65534.<br><br>Fabien<br></div></div><br></div></div></body></html>