MCPcopy Create free account
hub / github.com/Snapchat/Valdi / pointsToPixels

Function pointsToPixels

valdi/src/valdi/runtime/Views/Measure.cpp:15–17  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13namespace Valdi {
14
15int32_t pointsToPixels(float point, float pointScale) {
16 return static_cast<int32_t>(round(point * pointScale));
17}
18
19float pixelsToPoints(int32_t pixels, float pointScale) {
20 return static_cast<float>(pixels) / pointScale;

Callers 4

TESTFunction · 0.85
pointsToPackedPixelsFunction · 0.85
toPixelsMethod · 0.85

Calls 1

roundFunction · 0.85

Tested by 1

TESTFunction · 0.68