diff options
| author | Carl Hetherington <cth@carlh.net> | 2025-12-28 01:21:04 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2025-12-30 12:22:30 +0100 |
| commit | 931aa567b5435ae15877547b6030a583e1b19881 (patch) | |
| tree | 1fe39996aba0d4ea8b1482b47677c7abd401786b /src/lib/util.cc | |
| parent | 4edfd9afa0fdfea1fa6d86409e5696d90a580018 (diff) | |
Extract text_positions_close().
Diffstat (limited to 'src/lib/util.cc')
| -rw-r--r-- | src/lib/util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lib/util.cc b/src/lib/util.cc index ebac8c0e7..e53dc30c0 100644 --- a/src/lib/util.cc +++ b/src/lib/util.cc @@ -1192,3 +1192,10 @@ relative_path(boost::filesystem::path const& path, boost::filesystem::path const return relative; } + +bool +text_positions_close(float a, float b) +{ + return std::abs(a - b) < 1e-4; +} + |
