diff --git a/marble-sculp/disc.py b/marble-sculp/disc.py index 6d28883..b7e51c6 100644 --- a/marble-sculp/disc.py +++ b/marble-sculp/disc.py @@ -90,7 +90,14 @@ def baecher( -math.sin(echis), ] fisher_dip_dev_angle = math.acos( - (fisher_constant + math.log(1 - np.random.uniform())) / fisher_constant + max( + min( + (fisher_constant + math.log(1 - np.random.uniform())) + / fisher_constant, + 1, + ), + -1, + ) ) echis = (math.pi / 2) - (dip - fisher_dip_dev_angle) pole_dip_rotated = [