summaryrefslogtreecommitdiff
path: root/src/lib/util.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2025-12-28 01:21:04 +0100
committerCarl Hetherington <cth@carlh.net>2025-12-30 12:22:30 +0100
commit931aa567b5435ae15877547b6030a583e1b19881 (patch)
tree1fe39996aba0d4ea8b1482b47677c7abd401786b /src/lib/util.cc
parent4edfd9afa0fdfea1fa6d86409e5696d90a580018 (diff)
Extract text_positions_close().
Diffstat (limited to 'src/lib/util.cc')
-rw-r--r--src/lib/util.cc7
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;
+}
+