util: introduce SQUARE macro

This commit is contained in:
Miroslav Lichvar
2018-08-17 11:16:44 +02:00
parent a1f2f17385
commit 0b709ab1bc
6 changed files with 15 additions and 30 deletions

View File

@@ -553,7 +553,7 @@ SST_DoNewRegression(SST_Stats inst)
sd_weight = 1.0;
if (peer_distances[i] > min_distance)
sd_weight += (peer_distances[i] - min_distance) / sd;
weights[i] = sd_weight * sd_weight;
weights[i] = SQUARE(sd_weight);
}
}