Skip to content

Conversation

@stweil
Copy link
Member

@stweil stweil commented May 16, 2024

std::asin only allows arguments in [-1, 1], but rounding errors can produce values which are slightly outside of this range and which would cause a FP exception (or wrong calculation results).

Rename also the internally used function TPOINT::length to TPOINT::length2 because it calculates the square of the length.

std::asin only allows arguments in [-1, 1], but rounding errors can
produce values which are slightly outside of this range and which
would cause a FP exception (or wrong calculation results).

Rename also the internally used function `TPOINT::length` to `TPOINT::length2`
because it calculates the square of the length.

Signed-off-by: Stefan Weil <[email protected]>
@amitdo amitdo merged commit 74e4381 into tesseract-ocr:main May 17, 2024
@amitdo
Copy link
Collaborator

amitdo commented May 17, 2024

Thanks!

@stweil stweil deleted the issue4242 branch May 19, 2024 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants