Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 10 additions & 3 deletions src/Imath/ImathMatrixAlgo.h
Original file line number Diff line number Diff line change
Expand Up @@ -1385,10 +1385,17 @@ template <class T>
bool
checkForZeroScaleInRow (const T& scl, const Vec2<T>& row, bool exc /* = true */)
{
for (int i = 0; i < 2; i++)
if (abs (scl) < T(1))
{
if ((abs (scl) < 1 &&
abs (row[i]) >= std::numeric_limits<T>::max () * abs (scl)))
if (abs (row.x) >= std::numeric_limits<T>::max () * abs (scl))
{
if (exc)
throw std::domain_error (
"Cannot remove zero scaling from matrix.");
else
return false;
}
if (abs (row.y) >= std::numeric_limits<T>::max () * abs (scl))
{
if (exc)
throw std::domain_error (
Expand Down
Loading
Loading