Skip to content

Commit

Permalink
Remove impossible to reach code from angle_btw
Browse files Browse the repository at this point in the history
  • Loading branch information
nunofachada committed Mar 31, 2023
1 parent 26ba45e commit 06cd046
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions pyclugen/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from typing import Callable

from numpy import abs, arctan, argmax, argmin, pi, signbit, sum, zeros
from numpy import abs, arctan, argmax, argmin, sum, zeros
from numpy.linalg import norm
from numpy.random import Generator
from numpy.typing import NDArray
Expand Down Expand Up @@ -53,14 +53,7 @@ def angle_btw(v1: NDArray, v2: NDArray) -> float:
y = u1 - u2
x = u1 + u2

a0 = 2 * arctan(norm(y) / norm(x))

if (not signbit(a0)) or signbit(pi - a0):
return a0
elif signbit(a0):
return 0.0
else:
return pi
return 2 * arctan(norm(y) / norm(x))


def clupoints_n_1_template(
Expand Down

0 comments on commit 06cd046

Please sign in to comment.