mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Mar 2003
Posts: 21
N
Nanaki Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2003
Posts: 21
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.

Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Quote:
tangent of 45 = 0

Actually it's 1.

$tan(45).deg

Joined: Mar 2003
Posts: 21
N
Nanaki Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2003
Posts: 21
Heh, yeah, i dunno why I said that, i knew it was 0!

Although, try //echo -a $tan(45).deg .
It returns 1. Why?

Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
Thats just it, it IS 1 not 0..


-KingTomato
Joined: Mar 2003
Posts: 21
N
Nanaki Offline OP
Ameglian cow
OP Offline
Ameglian cow
N
Joined: Mar 2003
Posts: 21
There I go again...
I'm pretty sure i was taught 0, but i'm gonna shut up now.
Thanks.

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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


Link Copied to Clipboard