Skip to content

Instantly share code, notes, and snippets.

@ManivannanMurugavel
Created March 25, 2019 13:50
Show Gist options
  • Save ManivannanMurugavel/0109cb44f7a10cfb5525be254150f309 to your computer and use it in GitHub Desktop.
Save ManivannanMurugavel/0109cb44f7a10cfb5525be254150f309 to your computer and use it in GitHub Desktop.
import numpy as np
a = np.array([6,0])
b = np.array([0,0])
c = np.array([0,6])
ba = a - b
bc = c - b
cosine_angle = np.dot(ba, bc) / (np.linalg.norm(ba) * np.linalg.norm(bc))
angle = np.arccos(cosine_angle)
print np.degrees(angle)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment