Thread: Formulas.
View Single Post
  #2  
Old 02-09-2002, 01:42 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
Please excuse me if some of these don't work. They should, but it's been a while since I've scripted.

New Variables in red.


Ang = Angle, in Degrees
Rad = Angle, in Radians


-= Degrees to Radians =-

Rad = Ang * Pi / 180
Ang = Rad * 180 / Pi

-= Location of a point on a circle =-

X = X of point on circle
Y = Y of point on circle

X = cos(Ang)*R
Y = sin(Ang)*R

-= Angle of a point on a circle (when angle is unknown) =-

OX = Origin X (center of circle)
OY = Origin Y (center of circle)

Rad = arctan( ( Y - OY ) / ( X - OX) ) + ( Pi * ( X < OX) )
Reply With Quote