====== GetGravityG ======
{{tag>zdoom units needs_examples}}
''fixed GetGravityG()''
===== Description =====
Reads ''sv_gravity'' and returns current gravity in [[:units|standard acceleration units]] instead of ''sv_gravity'' units.
Default gravity is ''1.0''.
This function handles extremely large ''sv_gravity'' units by using [[IntDiv]] when ''sv_gravity'' is greater than [[constants:SHORT_MAX]], and using [[zdoom>FixedDiv]] otherwise to preserve precision.
Not all values returned by GetGravityG can be used as parameters to [[SetGravityG]]. Some may be too large for [[zdoom>SetGravity]]'s fixed-point argument once multiplied by 800.