| 330 | } |
| 331 | |
| 332 | bool 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 | |
| 352 | RangeOpDataRcPtr RangeOpData::compose(ConstRangeOpDataRcPtr & r) const |
| 353 | { |