#include <stdio.h>
#include <math.h>

int main() {
	double angle_degrees = 60.0;

	// Convert angle from degrees to radians
	double angle_radians = angle_degrees * (M_PI / 180.0);
	// Sin function
	printf("The sine of %.2lf degrees is %.4lf\n",
		       angle_degrees, sin(angle_radians));
	// Cos function
	printf("The cosine of %.2lf degrees is %.4lf\n",
		       angle_degrees, cos(angle_radians));
	// Tan function
	printf("The tangent of %.2lf degrees is %.4lf\n",
		       angle_degrees, tan(angle_radians));
	// Asin function
	printf("The arc sine of 0.5 is %.2lf degrees\n",
		       asin(0.5) * (180.0 / M_PI));
	// Acos function
	printf("The arc cosine of 0.5 is %.2lf degrees\n",
		       acos(0.5) * (180.0 / M_PI));
	// Atan function
	printf("The arc tangent of 1.0 is %.2lf degrees\n",
		       atan(1.0) * (180.0 / M_PI));
}

/*
This program demonstrates the usage of the following trigonometric functions
from the math.h library:

    sin: calculates the sine of an angle in radians
    cos: calculates the cosine of an angle in radians
    tan: calculates the tangent of an angle in radians
    asin: calculates the arc sine (inverse sine) of a number and
	returns the angle in radians
    acos: calculates the arc cosine (inverse cosine) of a number and
	returns the angle in radians
    atan: calculates the arc tangent (inverse tangent) of a number and
	returns the angle in radians

The program converts an angle from degrees to radians using the formula:
radians = degrees * (M_PI / 180.0). The output will show the result of each
trigonometric function call.
*/

/*
En un triángulo rectángulo, el arcoseno equivale a la expresión en radianes del
ángulo agudo correspondiente a la razón entre su cateto opuesto y la
hipotenusa. 
*/

