1
0
mirror of https://github.com/microsoft/DirectXTex synced 2024-11-21 20:10:05 +00:00

Fixed PCA math bugs

This commit is contained in:
elasota 2018-04-27 02:03:54 -04:00
parent 2df2e49e72
commit cca48f8e31

View File

@ -773,7 +773,7 @@ namespace
{
sum = sum + inVec[col] * m_values[index];
if (col >= row)
index += col;
index += col + 1;
else
index++;
}
@ -832,7 +832,7 @@ namespace
for (int ch = 0; ch < TVectorSize; ch++)
{
MFloat min = m_centroid[ch] + m_direction[ch] * m_minDist;
MFloat max = m_centroid[ch] + m_direction[ch] * (m_maxDist - m_minDist);
MFloat max = m_centroid[ch] + m_direction[ch] * m_maxDist;
float safeWeight = channelWeights[ch];
if (safeWeight == 0.f)