Share this page

# Example: cos

The following example calculates the cosine of 45 degrees using cos.

        #include <math.h>

        double cos(double x);
        double x = 45;
        lr_output_message ("Cosine of %lf deg = %lf", x, cos(x * PI/180));

    Example: Output:
    Action.c(9): Cosine of 45.000000 deg = 0.707107

Tips to improve your search results... VuGen Function Reference Version 25.1-25.3 Function Reference 25.1-25.3 All View Local Help Center View Online Help Center Version: