Skip to content

Commit

Permalink
Update misc.py
Browse files Browse the repository at this point in the history
  • Loading branch information
philipmnel authored Sep 19, 2023
1 parent 24c6fb9 commit d274dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qcelemental/util/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def compute_angle(points1, points2, points3, *, degrees: bool = False) -> np.nda
v23 = points2 - points3

denom = _norm(v12) * _norm(v23)
cosine_angle = np.einsum("ij,ij->i", v12, v23) / denom
cosine_angle = np.clip(np.einsum("ij,ij->i", v12, v23) / denom, -1, 1)

angle = np.pi - np.arccos(cosine_angle)

Expand Down

0 comments on commit d274dab

Please sign in to comment.