Re: Passing floats/doubles to C
- Posted by Robert Craig <rds at ATTCANADA.NET> Feb 13, 2000
- 520 views
Todd Riggins writes: > poke4(material, atom_to_float64(1.0)) > poke4(material+8, atom_to_float64(1.0)) > ... atom_to_float64() returns a sequence of 8 bytes - a C double. Use poke(material, atom_to_float64(1.0)) to store the 8 bytes in memory. poke4 will actually store 4*8 = 32 bytes - wrong. If you decide to use atom_to_float32() to store C *floats*, you can also use poke() to store the 4 bytes. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com