From 9c58701471d61adb48a12fff0f0a38f7d649b1eb Mon Sep 17 00:00:00 2001 From: Ray Smith Date: Tue, 12 Aug 2014 16:14:19 -0700 Subject: [PATCH] Fix to baselinedetect from issue 1205 --- textord/baselinedetect.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/textord/baselinedetect.cpp b/textord/baselinedetect.cpp index a525bc69c..a2b017394 100644 --- a/textord/baselinedetect.cpp +++ b/textord/baselinedetect.cpp @@ -108,7 +108,7 @@ double BaselineRow::BaselineAngle() const { double BaselineRow::SpaceBetween(const BaselineRow& other) const { // Find the x-centre of overlap of the lines. float x = (MAX(bounding_box_.left(), other.bounding_box_.left()) + - MIN(bounding_box_.right(), other.bounding_box_.right())) / 2; + MIN(bounding_box_.right(), other.bounding_box_.right())) / 2.0f; // Find the vertical centre between them. float y = (StraightYAtX(x) + other.StraightYAtX(x)) / 2.0f; // Find the perpendicular distance of (x,y) from each line.