aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rw-r--r--contrib/cone-vector.py4
1 files changed, 0 insertions, 4 deletions
diff --git a/contrib/cone-vector.py b/contrib/cone-vector.py
index 6effe53..16d1dfa 100644
--- a/contrib/cone-vector.py
+++ b/contrib/cone-vector.py
@@ -25,9 +25,6 @@ def random_vector_on_sphere (dim):
x = randn(dim)
return x / norm(x)
-def surface_area_of_ball (dim):
- return 2 * pi**(dim/2) / gamma(dim/2)
-
def planar_angle2solid_angle_fraction (planar_angle, dim):
alpha = (dim - 1) / 2
beta = 1/2
@@ -40,7 +37,6 @@ def planar_angle2solid_angle_fraction (planar_angle, dim):
def solid_angle_fraction2planar_angle (solid_angle_fraction, dim):
alpha = (dim - 1) / 2
beta = 1/2
- sn = surface_area_of_ball(dim)
if solid_angle_fraction < 1/2:
planar_angle = betaincinv(alpha, beta, 2*solid_angle_fraction)
else: