We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8658243 commit 45eef91Copy full SHA for 45eef91
src/primitives/ConicalFrustum.jl
@@ -176,3 +176,8 @@ function volume(x::ConicalFrustum)
176
pi * lengthVal * ( baseRadiusVal ^ 2 + baseRadiusVal * topRadiusVal + topRadiusVal ^ 2 ) / 3
177
178
end # function
179
+
180
+"""
181
+Computes the centroid of a frustum: the mean between the base and top centers.
182
183
+centroid(x::ConicalFrustum) = (baseCenter(x) + topCenter(x)) / 2
0 commit comments