diff --git a/profiler/src/profiler/TracyView_Compare.cpp b/profiler/src/profiler/TracyView_Compare.cpp index d39820d8..96d6e567 100644 --- a/profiler/src/profiler/TracyView_Compare.cpp +++ b/profiler/src/profiler/TracyView_Compare.cpp @@ -1001,7 +1001,7 @@ void View::DrawCompare() { const auto sz = sorted[0].size(); const auto avg = m_compare.average[0]; - const auto ss = sumSq0 - 2. * total0 * avg + avg * avg * sz; + const auto ss = sumSq0 - 2. * total0 * avg + double( avg ) * avg * sz; const auto sd = sqrt( ss / ( sz - 1 ) ); ImGui::SameLine(); @@ -1027,7 +1027,7 @@ void View::DrawCompare() { const auto sz = sorted[1].size(); const auto avg = m_compare.average[1]; - const auto ss = sumSq1 - 2. * total1 * avg + avg * avg * sz; + const auto ss = sumSq1 - 2. * total1 * avg + double( avg ) * avg * sz; const auto sd = sqrt( ss / ( sz - 1 ) ); ImGui::SameLine(); diff --git a/profiler/src/profiler/TracyView_FindZone.cpp b/profiler/src/profiler/TracyView_FindZone.cpp index 1044a5a8..4dd12b9d 100644 --- a/profiler/src/profiler/TracyView_FindZone.cpp +++ b/profiler/src/profiler/TracyView_FindZone.cpp @@ -1115,7 +1115,7 @@ void View::DrawFindZone() { const auto sz = m_findZone.sorted.size(); const auto avg = m_findZone.average; - const auto ss = zoneData.sumSq - 2. * zoneData.total * avg + avg * avg * sz; + const auto ss = zoneData.sumSq - 2. * zoneData.total * avg + double( avg ) * avg * sz; const auto sd = sqrt( ss / ( sz - 1 ) ); ImGui::SameLine(); diff --git a/profiler/src/profiler/TracyView_FrameStatistics.cpp b/profiler/src/profiler/TracyView_FrameStatistics.cpp index 7ee0f283..43fac0bb 100644 --- a/profiler/src/profiler/TracyView_FrameStatistics.cpp +++ b/profiler/src/profiler/TracyView_FrameStatistics.cpp @@ -129,7 +129,7 @@ void View::DrawFrameStatistics() if( vsz > 1 ) { const auto avg = m_frameSortData.average; - const auto ss = m_frameSortData.sumSq - 2. * total * avg + avg * avg * vsz; + const auto ss = m_frameSortData.sumSq - 2. * total * avg + double( avg ) * avg * vsz; m_frameSortData.sd = sqrt( ss / ( vsz - 1 ) ); } else