| 588 | } |
| 589 | |
| 590 | MapCoordF VirtualPath::calculateOutgoingTangent( |
| 591 | size_type i, |
| 592 | bool& ok) const |
| 593 | { |
| 594 | ok = true; |
| 595 | MapCoordF tangent; |
| 596 | |
| 597 | for (auto k = i+1; k <= last_index; ++k) |
| 598 | { |
| 599 | tangent = coords[k] - coords[i]; |
| 600 | if (tangent.lengthSquared() > PathCoord::tangentEpsilonSquared()) |
| 601 | return tangent; |
| 602 | } |
| 603 | |
| 604 | if (isClosed()) |
| 605 | { |
| 606 | // Continue from start |
| 607 | for (auto k = first_index; k < i; ++k) |
| 608 | { |
| 609 | tangent = coords[k] - coords[i]; |
| 610 | if (tangent.lengthSquared() > PathCoord::tangentEpsilonSquared()) |
| 611 | return tangent; |
| 612 | } |
| 613 | } |
| 614 | |
| 615 | ok = false; |
| 616 | return tangent; |
| 617 | } |
| 618 | |
| 619 | void VirtualPath::copy( |
| 620 | const SplitPathCoord& first, |
no test coverage detected