[fpc-pascal] Adding a array of float in ressource and use it ?

fredvs fiens at hotmail.com
Mon Mar 6 19:31:54 CET 2017


> Or, quite comically maybe: use a text file

Or maybe, like in my second post, convert float32 ---> integer32

for x := 0 to length(floatbuffer) -1 do 
  begin 
   floatbuffer[x] := round(floatbuffer[x] * 2147483647); 
   if floatbuffer[x] > 2147483647 then floatbuffer[x] := 2147483647; 
   if floatbuffer[x] < -2147483647 then floatbuffer[x] := -2147483647; 
  end; 

And do the reverse when reading from the file ?

Fre;D 



-----
Many thanks ;-)
--
View this message in context: http://free-pascal-general.1045716.n5.nabble.com/Adding-a-array-of-float-in-ressource-and-use-it-tp5727765p5727789.html
Sent from the Free Pascal - General mailing list archive at Nabble.com.



More information about the fpc-pascal mailing list