This command converts radians to degrees or degrees to radians.
x = GetDegree(y)
or
y = GetRadians(x)
x | The angle in degrees |
y | The angle in radians |
Use GetDegree if you must, but you can do the conversion yourself very easily. Just remember that 2 pi radians corresponds to 360 degrees, so:
Radians *57.3 = degrees Degrees/57.3 = radians
Most program users will be unfamiliar or uncomfortable with radians, so if you are printing angles to the screen, degrees are the way to go.
On the other hand, most functions (like sine, cosine and tangent) in Jamagic require the angle to be in radians.
oworld = New World(); ocamera = New Camera(oworld); sphere = oworld.CreateSphere(50,50,50,25,25); ocamera.MoveBack(1200); sphere.Walk(); //Loop While(TRUE) { z = sphere.getyangle(); Y = sin(z); // Convert to degrees. X = z* 57.3 SetText("yangle " + x + "cos " + y); }