47 double sumCounter = 0;
48 double sumDenominator = 0;
54 distance = sqrt(( vertex_it->x - x ) * ( vertex_it->x - x ) + ( vertex_it->y - y ) * ( vertex_it->y - y ) );
57 result = vertex_it->z;
61 sumCounter += ( currentWeight * vertex_it->z );
62 sumDenominator += currentWeight;
65 if ( sumDenominator == 0.0 )
70 result = sumCounter / sumDenominator;