Convert Irrlicht to use f64 as default.

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!

Should Irrlicht use f64 as default due to precision problems with other software?

Yes
4
22%
No
14
78%
 
Total votes: 18

hach-que
Posts: 33
Joined: Thu Apr 19, 2007 10:11 am
Location: Australia

Post by hach-que »

If I change Lua to use floats, then it has that problem.

I've managed to change f32 to double, and I've just gone through and replaced f32 with float where ever float is necessary. So far it seems to be working, I'll post if I get weird bugs with it.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

hach-que wrote:If I change Lua to use floats, then it has that problem.

I've managed to change f32 to double, and I've just gone through and replaced f32 with float where ever float is necessary. So far it seems to be working, I'll post if I get weird bugs with it.
Okay, first off, I'm pretty sure that's exactly what I suggested. Secondly, if this is a commercial product, and your releasing your modified Irrlicht source, then that's a very bad naming scheme. A double should be f64 because it is 64-bits, not f32. So instead you should just go through, and everywhere you kept f32, then change it to f64. Simple as that, then you can change all those floats back to f32! And it will be perfect, simple as that.

But once again, if you are releasing the source code, then you may want to consider making it more friendly for users to modify whether they want that extra precision or not.
TheQuestion = 2B || !2B
Post Reply