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

Method scales

src/OpenColorIO/ops/range/RangeOpData.cpp:332–350  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

330}
331
332bool RangeOpData::scales() const
333{
334 // Check if offset is non-zero or scale is not unity.
335
336 // Offset is likely to be zero, so cannot do a relative comparison.
337 if ( fabs(m_offset) > 1e-6 )
338 {
339 return true;
340 }
341
342 // Scale may vary from very small to vary large, however it's also allowed to be 0, so neither
343 // relative or absolute comparison is appropriate for all cases.
344 if ( FloatsDiffer(m_scale, 1.0) )
345 {
346 return true;
347 }
348
349 return false;
350}
351
352RangeOpDataRcPtr RangeOpData::compose(ConstRangeOpDataRcPtr & r) const
353{

Callers 4

GetRangeGPUShaderProgramFunction · 0.80
GetRangeRendererFunction · 0.80
OCIO_ADD_TESTFunction · 0.80
OCIO_ADD_TESTFunction · 0.80

Calls 1

FloatsDifferFunction · 0.85

Tested by 2

OCIO_ADD_TESTFunction · 0.64
OCIO_ADD_TESTFunction · 0.64