rad2deg

From ZDoom Wiki
Revision as of 01:57, 5 May 2013 by The Zombie Killer (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This function converts the radian values returned by angle functions to degrees.

 function int rad2deg (int rad)
 {
   return FixedDiv(rad, 0.0174532925); 
 }

This example prints the player's view pitch into degrees.

 script 1 (void)
 {
   Print(f:rad2deg(GetActorPitch(0));
 }