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

Function SanitizeFloat

src/OpenColorIO/MathUtils.cpp:145–160  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145float SanitizeFloat(float f)
146{
147 if (f == -std::numeric_limits<float>::infinity())
148 {
149 return -std::numeric_limits<float>::max();
150 }
151 else if (f == std::numeric_limits<float>::infinity())
152 {
153 return std::numeric_limits<float>::max();
154 }
155 else if (IsNan(f))
156 {
157 return 0.0f;
158 }
159 return f;
160}
161
162template<typename T>
163bool IsM44Identity(const T * m44)

Callers 4

createOptLutMethod · 0.85
CreatePaddedLutChannelsFunction · 0.85
CreatePaddedRedChannelFunction · 0.85
updateDataMethod · 0.85

Calls 1

IsNanFunction · 0.85

Tested by

no test coverage detected