| 1001 | } |
| 1002 | |
| 1003 | double angle_between_dirs_deg(const DDir& a, const DDir& b) { |
| 1004 | auto u = unit(a); |
| 1005 | auto v = unit(b); |
| 1006 | auto c = std::abs(u * v); |
| 1007 | if (c > 1.) { |
| 1008 | c = 1.; |
| 1009 | } |
| 1010 | return std::acos(c) * 180. / 3.14159265358979323846; |
| 1011 | } |
| 1012 | |
| 1013 | std::array<DPoint, 4> rectangle_corners(const DPoint& start, const DPoint& end, double width) { |
| 1014 | auto u = unit(end - start); |
no test coverage detected