ftkalcevic
Member
I'm trying to implement the equation to approximate the perimeter of an ellipse.
I'm basing it on "Approximation 3" here...
https://www.mathsisfun.com/geometry/ell ... meter.html
h = (a-b)^2 / (a+b)^2
p = pi(a+b)(1 + 3h/( 10 + sqrt(4-3h)))
But I can't seem to make any progress because of the strict typing.
My constants A and B are distances, derived from other parameters.
I'm stuck at trying to create a variable called H, using the equation above. Squaring (a-b) fails immediately because they are distances. I've tried setting the type of H to scale and distance, but no success.
Any suggestions? Can I convert (cast) a distance to scale type?
I'm basing it on "Approximation 3" here...
https://www.mathsisfun.com/geometry/ell ... meter.html
h = (a-b)^2 / (a+b)^2
p = pi(a+b)(1 + 3h/( 10 + sqrt(4-3h)))
But I can't seem to make any progress because of the strict typing.
My constants A and B are distances, derived from other parameters.
I'm stuck at trying to create a variable called H, using the equation above. Squaring (a-b) fails immediately because they are distances. I've tried setting the type of H to scale and distance, but no success.
Any suggestions? Can I convert (cast) a distance to scale type?