Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for [old] Humpty Dumpty Form by mozurin
"use strict";
function spheroid(a, b)
{
const e = (1 - (a > b? b / a : a / b) ** 2) ** 0.5;
return [
Math.PI * a * b**2 / 6,
Math.PI * (
b**2 + (
b == a? b**2 :
b > a?
a**2 * Math.atanh(e) / e :
a * b * Math.asin(e) / e
)
) / 2,
].map(n => parseFloat(n.toFixed(2)));
}
April 14, 2019
Comments: