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

Function distVal

MyGUIEngine/src/msdfgen/core/render-sdf.cpp:11–13  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9namespace msdfgen {
10
11static float distVal(float dist, DistanceMapping mapping) {
12 return (float) clamp(mapping(dist)+.5);
13}
14
15void renderSDF(const BitmapSection<float, 1> &output, const BitmapConstSection<float, 1> &sdf, Range sdfPxRange, float sdThreshold) {
16 Vector2 scale((double) sdf.width/output.width, (double) sdf.height/output.height);

Callers 1

renderSDFFunction · 0.85

Calls 1

clampFunction · 0.85

Tested by

no test coverage detected