MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / ClampToNormHalf

Function ClampToNormHalf

src/OpenColorIO/MathUtils.cpp:118–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118double ClampToNormHalf(double val)
119{
120 if(val < -GetHalfMax())
121 {
122 return -GetHalfMax();
123 }
124
125 if(val > -GetHalfNormMin() && val<GetHalfNormMin())
126 {
127 return 0.0;
128 }
129
130 if(val > GetHalfMax())
131 {
132 return GetHalfMax();
133 }
134
135 return val;
136}
137
138float ConvertHalfBitsToFloat(unsigned short val)
139{

Callers 1

getFloatStringFunction · 0.85

Calls 2

GetHalfMaxFunction · 0.85
GetHalfNormMinFunction · 0.85

Tested by

no test coverage detected