From 3ab6a92c6e9de6b2f72c3280574fd2e74bf8de36 Mon Sep 17 00:00:00 2001 From: luz paz Date: Thu, 8 Jul 2021 08:09:06 -0400 Subject: [PATCH] Fix weigths->weights --- toonz/sources/common/tvrender/tinbetween.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/toonz/sources/common/tvrender/tinbetween.cpp b/toonz/sources/common/tvrender/tinbetween.cpp index 2318b100..6a295efc 100644 --- a/toonz/sources/common/tvrender/tinbetween.cpp +++ b/toonz/sources/common/tvrender/tinbetween.cpp @@ -689,7 +689,7 @@ void TInbetween::Imp::computeTransformation() { std::vector samplingPoint1(samplingPointNumber), samplingPoint2(samplingPointNumber); TStroke *stroke1, *stroke2; - std::vector ratioSampling, weigths, subStrokeXScaling, + std::vector ratioSampling, weights, subStrokeXScaling, subStrokeYScaling; UINT strokeCount1 = m_firstImage->getStrokeCount(); @@ -1011,8 +1011,8 @@ debugStream <<"num angoli 2: "<< angles2.size() << endl; ratioSampling.clear(); ratioSampling.reserve(samplingPointNumber); - weigths.clear(); - weigths.reserve(samplingPointNumber); + weights.clear(); + weights.reserve(samplingPointNumber); TPointD pOld, pNew; // double totalW=0; @@ -1024,7 +1024,7 @@ debugStream <<"num angoli 2: "<< angles2.size() << endl; if (pNew == stroke2Centroid) continue; versor1 = normalize(pOld - stroke1Centroid); versor2 = normalize(pNew - stroke2Centroid); - weigths.push_back(tdistance(pOld, stroke1Centroid) + + weights.push_back(tdistance(pOld, stroke1Centroid) + tdistance(pNew, stroke2Centroid)); cs = versor1 * versor2; sn = cross(versor1, versor2); @@ -1036,7 +1036,7 @@ debugStream <<"num angoli 2: "<< angles2.size() << endl; subStroke1 = 0; subStroke2 = 0; - double radRotation = weightedAverage(ratioSampling, weigths); + double radRotation = weightedAverage(ratioSampling, weights); totalRadRotation += radRotation; }