sorry for my layman terminology, but to my understanding as a coder a function has a name, parameters, arguments and operations. if sin is the name, and its parameters are side opposite and hypotenuse, and its arguments are context dependent, what is the operation itself? am i making sense?
def sin (hypotenuse, opposite):
??!?!?!!?
also what are the other fives operations, sin was just an example
I belive that this may be what you’re looking for: https://en.wikipedia.org/wiki/Trigonometric_functions#Right-angled_triangle_definitions
One way to think about it -
The argument to the function is an angle
The operation is:
Draw a triangle with hypotenuse length 1, one angle 90, another angle is the one passed to the function
Divide the length of the side opposite the passed angle by the length of the hypotenuse
Return this value
The other trig functions are the same with different sides being divided.