DarkRadiant: master 89c20a3d

Author Committer Branch Timestamp Parent
stgatilov stgatilov master 07.01.2023 15:21 master d0f9be37
Changeset Added some tolerance to width comparisons to avoid unprodictable behavior in case of exact equality.

Without this tolerance, the cases where line width is exactly correct mathematically are doomed to work randomly.
Sometimes a word is added, sometime it is broken to a new line.
There is 50% chance of doing the same as Doom 3 engine (because D3 uses floats and slightly different computations).

Note that I added the same 1e-3 tolerance to this check in TDM, which will hopefully get into 2.11...
mod - plugins/dm.gui/gui/TextParts.h Diff File