From the course: C Standard Library

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Trigonometric functions example

Trigonometric functions example - C Tutorial

From the course: C Standard Library

Start my 1-month free trial

Trigonometric functions example

- [Instructor] Trigonometric functions are very straightforward. So in this example I will concentrate on illustrating the angle system they use so that you know if they use radians or degrees. So let's do that with a printf and I'll type sine of 90 degrees equals this value. And I'll call sine of 90.0. So the sine of 90 degrees is one. So if we get something other than one, well it must be radians. So let's take a look. And as you can see we get 0.89, so it's not one. Let's make some changes then. And let me change what I am sending to the sine. Let's say pi divided by 2.0. So pi divided by two is 90 degrees, expressed in radians. So let me define that constant to this very nice value of pi. Let's see it working now. And now we get that sine of 90 degrees is one. So there you have it, trigonometric functions in the C standard library use the angle in radians.

Contents