do the sum of two commerce_price field with programming api I want to do the sum of two commerce_price fields and set the result in another one.

i've tried to just add the related ['amount'] values and set the result into another price field but it looses the components (VAT, taxes...).

Is there a commerce api call to do that ?
Such as :

add_price($price1,$price2) 


returning the full added price with all it's component ?

Thx
There is no basic price addition function, though we have API enhancements on the roadmap for Commerce 2.x. I'd take a look at what commerce_order_calculate_total() is doing to figure the order total price field; you have to sum the amounts, like you've already discovered, and you then use commerce_price_components_combine() to merge the two price fields' components arrays together. Hope that helps!