mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-05 01:09:40 +08:00
Fix some typos (#6113)
* Fix some typos. * Update volume.py Co-authored-by: John Law <johnlaw.po@gmail.com>
This commit is contained in:
@ -38,8 +38,8 @@ def vol_spheres_intersect(
|
||||
Calculate the volume of the intersection of two spheres.
|
||||
|
||||
The intersection is composed by two spherical caps and therefore its volume is the
|
||||
sum of the volumes of the spherical caps. First it calculates the heights (h1, h2)
|
||||
of the the spherical caps, then the two volumes and it returns the sum.
|
||||
sum of the volumes of the spherical caps. First, it calculates the heights (h1, h2)
|
||||
of the spherical caps, then the two volumes and it returns the sum.
|
||||
The height formulas are
|
||||
h1 = (radius_1 - radius_2 + centers_distance)
|
||||
* (radius_1 + radius_2 - centers_distance)
|
||||
|
Reference in New Issue
Block a user