How to convert fixed point angle to degrees?

Archive of the old editing forum
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. This forum is archived - please use this set of forums to ask new questions.
Locked
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

How to convert fixed point angle to degrees?

Post by Nash »

I have a fixed point angle which I'd like to convert to degrees (0 to 360), how do I do this?
Gez
 
 
Posts: 17946
Joined: Fri Jul 06, 2007 3:22 pm

Re: How to convert fixed point angle to degrees?

Post by Gez »

Fixed point are on a scale from 0 to 65536.
Degrees are on a scale from 0 to 360

Therefore:

(X * 360) / 65536
User avatar
Nash
 
 
Posts: 17501
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: How to convert fixed point angle to degrees?

Post by Nash »

Thanks Gez.
Locked

Return to “Editing (Archive)”