mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 03:24:56 +08:00
public: crtlib: use Q_rint instead of round in Q_pretifymem, so we don't have to link libm when we don't need it
This commit is contained in:
@@ -421,7 +421,7 @@ char *Q_pretifymem( float value, int digitsafterdecimal )
|
||||
|
||||
// if it's basically integral, don't do any decimals
|
||||
if( fabs( value - (int)value ) < 0.00001f || digitsafterdecimal <= 0 )
|
||||
Q_snprintf( val, sizeof( val ), "%i %s", (int)round( value ), suffix );
|
||||
Q_snprintf( val, sizeof( val ), "%i %s", (int)Q_rint( value ), suffix );
|
||||
else if( digitsafterdecimal >= 1 )
|
||||
Q_snprintf( val, sizeof( val ), "%.*f %s", digitsafterdecimal, (double)value, suffix );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user