Debian Codegraph @

thirdparty/msdfgen/core/pixel-conversion.hpp

raw symbols SCIP
1
2 #pragma once
3
4 #include "arithmetics.hpp"
5
6 namespace msdfgen {
7
8 inline byte pixelFloatToByte(float x) {
9 return byte(~int(255.5f-255.f*clamp(x)));
10 }
11
12 inline float pixelByteToFloat(byte x) {
13 return 1.f/255.f*float(x);
14 }
15
16 }