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!
//! returns if a float equals the other one, taking floating
//! point rounding errors into account
inline bool equals(const f32 a, const f32 b, const f32 tolerance = ROUNDING_ERROR_32)
{
return (a + tolerance > b) && (a - tolerance < b);
}
when a = 600.0, b = 600.0, ROUNDING_ERROR_32 = 0.000001, it returns false. This is driving me crazy.
Sure, it uses < and > instead of <= and >=. But that was fixed already some time ago, so either make those changes to your sources, or use the 1.4 release/beta.
Because f32 is not equal to float. It might be replaced by some other implementation of low precision non-integer arithmetics. If someone wants to create a proper class of it... It might be useful. Well, maybe when fixed-point arithmetics come in.