Deduplicate the code and use the same logic used to calculate individual elements in `t->values_final[0]`. Differential revision: https://developer.blender.org/D6135
Deduplicate the code and use the same logic used to calculate individual elements in `t->values_final[0]`. Differential revision: https://developer.blender.org/D6135