MCPcopy Create free account
hub / github.com/MyGUI/mygui / estimateEdgeLength

Function estimateEdgeLength

MyGUIEngine/src/msdfgen/core/edge-coloring.cpp:27–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27static double estimateEdgeLength(const EdgeSegment *edge) {
28 double len = 0;
29 Point2 prev = edge->point(0);
30 for (int i = 1; i <= MSDFGEN_EDGE_LENGTH_PRECISION; ++i) {
31 Point2 cur = edge->point(1./MSDFGEN_EDGE_LENGTH_PRECISION*i);
32 len += (cur-prev).length();
33 prev = cur;
34 }
35 return len;
36}
37
38static int seedExtract2(unsigned long long &seed) {
39 int v = int(seed)&1;

Callers 1

edgeColoringInkTrapFunction · 0.85

Calls 2

pointMethod · 0.45
lengthMethod · 0.45

Tested by

no test coverage detected