weighted_sum

weighted_sum(values, weights, quat_iter: int, quat_eps: double) Value

Computes the weighted sum of a set of values.

This function takes a collection of values and their corresponding weights to compute a weighted sum. Both spans must have the same size. If no values are provided, the function returns Value::default_value. If the first value is not interpolable, the function returns the value with the highest weight. The optional parameters control the number of iterations and the convergence criteria for quaternion calculations, if applicable.

The computed weighted sum of the input values, Value::default_value if no values are provided, or the value with the highest weight if the value is not interpolable.

values.size() == weights.size()

Return type

Value