I'm trying to model a function off of the example here, but I'm getting a different result using the same parameters.
def getTwoSidesOfASATriangle(a1, a2, s):
'''
Get the length of two sides of a triangle, given two angles, and the length of the side in-between.
args:
a1 (float) = Angle in degrees.
a2 (float) = Angle in degrees.
s (float) = The distance of the side between the two given angles.
returns:
(tuple)
'''
from math import sin
a3 = 180 - a1 - a2
result = (
(s/sin(a3)) * sin(a1),
(s/sin(a3)) * sin(a2)
)
return result
d1, d2 = getTwoSidesOfASATriangle(76, 34, 9)
print (d1, d2)