#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

#### Categories

Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

# WHAT IS SIN, COS AND TAN?

Guest
Please explain the terms "sine", "cosine" and

"tangent".

The corresponding C functions -- sin(double), cos(double) and tan(double) -- accept a double int

I'm a self-taught ASM/C/C++/Java game/graphics programmer. I'm trying to learn 3D. My

books assume knowledge of sin, cos and tan.

Thanks.

· ·

• Guest
: Please explain the terms "sine", "cosine" and

: "tangent".

:

: The corresponding C functions -- sin(double), cos(double) and tan(double) -- accept a double int

:

: I'm a self-taught ASM/C/C++/Java game/graphics programmer. I'm trying to learn 3D. My

: books assume knowledge of sin, cos and tan.

:

: Thanks.

:

Well, I am NOT a C++ programmer and I am only a Pascal programmer, thus I don't really know if there is a function that converts and angle in DEGREE to RADIAN (radian is just another unit of angle measurement that is used in programming languages - don't know if all of them use it though), but you can easily implement one yourself.

(I will try to use C++ here, put don't expect it to be perfect)

{ of float, you can

Radian = (Angle/180) * pi; but I don't know

return Radian; cuz it is C

}

If that doesn't make sense to you (probably because of the scripting), here is the pascal way:

function DegToRad(Angle : double) : double;

begin

end;

Sine, Cosine and Tan are... well, trigonometric ratios which you will need when you do things like rotation (if you are considering doing 3D graphics). Do more research on 3D transformations, they should cover the sin, cos, tan topic.

Good Luck!

· ·
• Guest
: Please explain the terms "sine", "cosine" and

: "tangent".

:

: The corresponding C functions -- sin(double), cos(double) and tan(double) -- accept a double int

:

: I'm a self-taught ASM/C/C++/Java game/graphics programmer. I'm trying to learn 3D. My

: books assume knowledge of sin, cos and tan.

Haven't taken trigonometry yet?

There are 360 degrees in a circle, and there are 2pi radians in a circle.

Radians, or rather the radius is the length from the center of a circle to the edge. It takes 2 radians, multiplied by pi which is roughly 3.14 to equal the circumfrence's (the actual edge of the circle) length.

To convert degrees to radians multiply the degrees by pi/180. To make degrees out of radians multiply by 180/pi.

Learn Trig, it'll help.

-Xotor-

· ·