Unit conversions

Angles

ang2deg

fixed ang2deg(angle a)

Converts ZDoom angles to degrees.

ang2rad

fixed ang2rad(angle a)

Converts ZDoom angles to radians.

deg2ang

angle deg2ang(fixed degrees)

Converts degrees to ZDoom angles.

deg2rad

fixed deg2rad(fixed degrees)

Converts degrees to radians.

rad2ang

angle rad2ang(fixed radians)

Converts radians to ZDoom angles.

rad2deg

fixed rad2deg(fixed radians)

Converts radians to degrees.

ang2byte

int ang2byte(angle a)

Converts ZDoom angles to byte angles.

byte2ang

angle byte2ang(int byteAngle)

Converts byte angles to ZDoom angles.

Gravity

Free fall acceleration is measured in mapunits per tic.

The default gravity is 1.0 mu/tic, or 800 sv_gravity units.

accel2grav

fixed accel2grav(fixed accel)

Converts free fall acceleration to sv_gravity units.

grav2accel

fixed grav2accel(fixed gravity)

Converts sv_gravity units to free fall acceleration.