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.