mIRC Homepage
Posted By: Nanaki Using $tan, $cos and $sin in degrees - 30/03/03 12:43 AM
I know, from my time at school, that the tangent of 45 = 0. However, upon //echo -a $tan(45), the result given is 1.619775. This is not wrong, but it is merely the answer in radians. I wish to know the answer in degrees.

Is there any way of working it out? Perhaps by using $calc and variables?

Thanks in advance,
Nanaki.
Posted By: Collective Re: Using $tan, $cos and $sin in degrees - 30/03/03 12:51 AM
Quote:
tangent of 45 = 0

Actually it's 1.

$tan(45).deg
Posted By: Nanaki Re: Using $tan, $cos and $sin in degrees - 30/03/03 01:09 PM
Heh, yeah, i dunno why I said that, i knew it was 0!

Although, try //echo -a $tan(45).deg .
It returns 1. Why?
Posted By: KingTomato Re: Using $tan, $cos and $sin in degrees - 30/03/03 03:34 PM
Thats just it, it IS 1 not 0..
Posted By: Nanaki Re: Using $tan, $cos and $sin in degrees - 30/03/03 08:52 PM
There I go again...
I'm pretty sure i was taught 0, but i'm gonna shut up now.
Thanks.
Posted By: codemastr Re: Using $tan, $cos and $sin in degrees - 31/03/03 05:20 AM
tan(45) = sin(45)/cos(45)

sin(45) = sqrt(2)/2
cos(45) = sqrt(2)/2

tan(45) = (sqrt(2)/2)/(sqrt(2)/2) = 1
© mIRC Discussion Forums