Thread: Trigonometry...
View Single Post
Old 04-03-2010, 08:20 PM   #1 (permalink)
maeltar
The Acquainted
 
Join Date: Nov 2009
Location: nr Stratford-Upon-Avon
Posts: 137
Thanks: 3
maeltar is on a distinguished road
Default Trigonometry...

Ok, have been scratching my head a bit on this one...


It should be simple enough as it is a right angle triangle that I am working on..

(Actually it's for stair cases)

What I need to be able to find is the Hypotenuse..

Simple enough ? I thought so as well...

hyp = Opposite / Sin(34)

which if am understanding things right, the php should look like..

$hyp = $oppo / sin(35);

ok, so then I realised I was getting degrees not radians..

so used.. deg2rad()

$hyp = $oppo / deg2rad(sin(35));

and guess what, the answer I get does not match what I expect to see, I have used my daughters GCSE revision books to check the results, using :-

$hyp = 15 / deg2rad(sin(35));

$hyp should = 26.151 (or there abouts)

However I get -2007.17299864 !!!! not quite what was expecting..

HELP please..
__________________
Thanks... Simon

Sex, Drugs & Linux Rules
Send a message via MSN to maeltar
maeltar is offline  
Reply With Quote