MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / angle_between_dirs_deg

Function angle_between_dirs_deg

src/svgfill/src/arrange_polygons.cpp:1003–1011  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1001}
1002
1003double 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
1013std::array<DPoint, 4> rectangle_corners(const DPoint& start, const DPoint& end, double width) {
1014 auto u = unit(end - start);

Callers 4

edge_supports_same_lineFunction · 0.85
merge_scoreFunction · 0.85
clusters_can_mergeFunction · 0.85
snap_points_to_box_axesFunction · 0.85

Calls 1

unitFunction · 0.70

Tested by

no test coverage detected