[Nottingham] Trigonometry!

Richard Hayes ricky at domainarena.net
Wed Jan 24 23:21:33 GMT 2007


Hello guys.

Slightly off topic, but it's something I'm programming in PHP on a Linux server so it kind of counts.

I'm writing some stuff in GD lib (php) which draws me nice graphs. Except I can't remember a thing about trigonometry from school and I'm struggling.

I have two set of coordinates, eg:

1. 0,0
2. 25,25

With a line drawn between them.

I know that this line is at 135 degrees from 0 (correct me if i'm wrong!). What calculation can I do on these number to give this this amount in degrees?

(Or, let's say my coords are 0,0 drawn to 50,0, then my angle is 90 degrees (a right angle).)

It's really as simple as that.

I've googled and googled and googled, but I'm beat.

Any help?

Thanks!

Kind regards,

Richard Hayes
DomainArena
ricky at domainarena.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.lug.org.uk/pipermail/nottingham/attachments/20070124/23468136/attachment.html


More information about the Nottingham mailing list