MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / findAngle

Function findAngle

source/MRMesh/MROffsetContours.cpp:153–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

151}
152
153float findAngle( const Vector2f& prev, const Vector2f& org, const Vector2f& next )
154{
155 auto a = prev - org;
156 auto b = next - org;
157 auto crossRes = cross( a, b );
158 auto dotRes = dot( a, b );
159 if ( crossRes == 0.0f )
160 return dotRes >= 0.0f ? 0.0f : PI_F;
161 else
162 return std::atan2( crossRes, dotRes );
163}
164
165struct CornerParameters
166{

Callers 2

insertSharpCornerFunction · 0.85

Calls 2

crossFunction · 0.70
dotFunction · 0.70

Tested by

no test coverage detected