| 636 | } |
| 637 | |
| 638 | bool GetLineIntersection(const float aLine1[2], const float aLine2[2], float aIntersection[2]) |
| 639 | { |
| 640 | float aBorders[2] = { |
| 641 | std::max(aLine1[0], aLine2[0]), |
| 642 | std::min(aLine1[1], aLine2[1])}; |
| 643 | |
| 644 | if(aIntersection) |
| 645 | SetInexistent(aIntersection, 2); |
| 646 | |
| 647 | if(aBorders[0] - aBorders[1] > 0.01f) |
| 648 | return false; |
| 649 | |
| 650 | if(aIntersection) |
| 651 | mem_copy(aIntersection, aBorders, sizeof(float[2])); |
| 652 | |
| 653 | return true; |
| 654 | } |
| 655 | |
| 656 | void SetInexistent(float *pArray, const int Count) |
| 657 | { |
no test coverage detected