AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO

MathUtils.cpp/h: Unused functions / duplicated functionality

Open
#2,259 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
2.1k
Forks
503
PR merge metrics
No merged PRs in 30d

Description

In MathUtils.cpp there are a number of functions that are apparently not used by the rest of the code:

GetSafeScalarInverse
VecContainsZero
VecContainsOne
GetM44Inverse
GetM44M44Product
GetM44V4Product
GetV4Sum
GetMxbCombine
GetMxbInverse

Should they be used int he code where we are not? or should the code be removed? I'm more concerned with the 4x4 matrix bits as they don't look the most robust numerically, and we have code in MatrixOpData.cpp for a better inverse.

I also note we have a IsNan function that is a simple wrapper for std::isnan do we need it? If we want to keep it we should update the test code the calls std::isnan to use the wrapper.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.