AcademySoftwareFoundation / AcademySoftwareFoundation/OpenColorIO
MathUtils.h: Investigate replace/remove Clamp() function in favour of C++17 std::clamp()
オープン
Modernise (C++17)
- 主要言語
- C++
- スター
- 2.1k
- フォーク
- 503
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
As we are now C++17 or greater we should probably investigate replacing calls to Clamp() with std::clamp.
Care may need with both performance and behaviour of non-normals etc to ensure the behaviour remains unchanged - for example ordering of arguments when one of them is a Nan, handling of +0.0 vs -0.0 etc
https://en.cppreference.com/w/cpp/algorithm/clamp.html
At first glance our implementation appears to be directly substitutable.
コントリビューションガイド
調査の方向性
まず既存の Clamp() 実装とそのすべての呼び出し箇所を見つけ、リンク先の C++17 std::clamp リファレンスと比較します。NaN 引数の順序、および +0.0 と -0.0 に関して、置き換えによってパフォーマンスと動作が維持されるかどうかを判断し、影響を受ける使用箇所を特定できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- cpp
- 領域
- computer-graphics, performance
- issue の種類
- リファクタリング
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 38/100