Be sure to come back and test that this installs once support for the transformation marketplace is added to MainUI.
Also, you could make it generic by passing in the dimensions instead of hard coding them in the transformation. That would make it much more flexible for those who install it from the marketplace later.
Calling it with arguments would look like: config:js:depth_to_litres?bot_d=5.12&top_d=7.22&height=8.74
and the transformation itself would become:
(function(depth, bot_d, top_d, height) {
const z = height * (bot_d / (top_d - bot_d));
const r = (top_d * (depth / 10 + z)) / ( 2 * (height + z));
return Math.round((Math.PI * depth / 10) * (Math.pow(r, 2) + r * bot_d / 2 + Math.pow(bot_d / 2, 2)) / 3, 1);
})(input, bot_d, top_d, height)