; Trigonometric functions as complex exponentials.
; Based on Euler's identity: e^(i*x) = cos(x) + i*sin(x)
; "x" is an angle in radians.

; Unity relationship: sin(x)^2 + cos(x)^2 = 1

; sin(x) (sine of x) = cos(pi/2 - x)
sin=(e^(i*x)-e^(-i*x))/(2i)

; cos(x) (cosine of x) = sin(pi/2 - x)
cos=(e^(i*x)+e^(-i*x))/2

; tan(x) (tangent of x) = sin(x)/cos(x) = cot(pi/2 - x)
tan=(e^(i*x)-e^(-i*x))/(i*(e^(i*x)+e^(-i*x)))

; cot(x) (cotangent of x) = cos(x)/sin(x) = tan(pi/2 - x)
cot=i*(e^(i*x)+e^(-i*x))/(e^(i*x)-e^(-i*x))

; sec(x) (secant of x) = 1/cos(x) = csc(pi/2 - x)
sec=2/(e^(i*x)+e^(-i*x))

; csc(x) (cosecant of x) = 1/sin(x) = sec(pi/2 - x)
csc=2i/(e^(i*x)-e^(-i*x))
