mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-12-01 07:59:05 +08:00
Fix warnings from LGTM
This fixes three LGTM warnings: Multiplication result may overflow 'float' before it is converted to 'double'. Signed-off-by: Stefan Weil <sw@weilnetz.de>
This commit is contained in:
parent
4a434809b0
commit
fdf4067296
@ -195,9 +195,9 @@ FCOORD LLSQ::mean_point() const {
|
||||
double LLSQ::rms_orth(const FCOORD &dir) const {
|
||||
FCOORD v = !dir;
|
||||
v.normalise();
|
||||
return std::sqrt(v.x() * v.x() * x_variance() +
|
||||
2 * v.x() * v.y() * covariance() +
|
||||
v.y() * v.y() * y_variance());
|
||||
return std::sqrt(x_variance() * v.x() * v.x() +
|
||||
2 * covariance() * v.x() * v.y() +
|
||||
y_variance() * v.y() * v.y());
|
||||
}
|
||||
|
||||
// Returns the direction of the fitted line as a unit vector, using the
|
||||
|
Loading…
Reference in New Issue
Block a user