Skip to content

Instantly share code, notes, and snippets.

@PedroBern
Created May 26, 2019 18:04
Show Gist options
  • Save PedroBern/990806860d3694d9fa6f268fe8b5b9b7 to your computer and use it in GitHub Desktop.
Save PedroBern/990806860d3694d9fa6f268fe8b5b9b7 to your computer and use it in GitHub Desktop.
from trianglesolver import solve
import numpy as np
# a, b, c são os lados dos triangulos
# A, B, C são os angulos dos triangulos, sempre opostos ao lado de mesma letra
a, b, c, A, B, C = solve(a=11.4, B=np.deg2rad(60), C=np.deg2rad(110))
print('Distancia margem do rio (metros):', b)
a, b, c, A, B, C = solve(a=46.4, b=3.9-0.4, C=np.pi/2)
print('Declividade da praia (graus):', np.rad2deg(B))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment