Skip to content

Commit

Permalink
Add mean_radius property to Sphere
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Wieczorek committed Mar 25, 2024
1 parent 8ba1134 commit 2cb926e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions boule/_sphere.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ def first_eccentricity(self):
"""
return 0

@property
def mean_radius(self):
"""
The mean radius of the sphere is by definition equal to its radius.
Added for compatibility with pymap3d.
Definition: :math:`R = R`.
Units: :math:`m`.
"""
return self.radius

@property
def volume(self):
r"""
Expand Down

0 comments on commit 2cb926e

Please sign in to comment.