If the sum of the input array is 0.0, the weights are still normalized and all set to the same value of 1.0 divided by the number of values.
void weightarraynormalize(float &weights[])