Include tgmath.h and cmath headers.

This commit is contained in:
Andrey Akhmichin 2019-10-13 18:37:32 +05:00
parent 73397679c2
commit a9f37f6d74
13 changed files with 45 additions and 27 deletions

View File

@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>
#include "studio_util.h"
#include "r_studioint.h"

View File

@ -19,7 +19,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>
#include "studio_util.h"
#include "r_studioint.h"

View File

@ -21,7 +21,7 @@
#include <stdio.h>
#include <string.h>
#include <memory.h>
#include <math.h>
#include <cmath>
#include "studio_util.h"
#include "r_studioint.h"

View File

@ -18,9 +18,9 @@
// implementation of CHudHealth class
//
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"

View File

@ -15,7 +15,8 @@
//
// hud_redraw.cpp
//
#include <math.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"
//#include "triangleapi.h"

View File

@ -16,7 +16,7 @@
// hud_update.cpp
//
#include <math.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"
#include <stdlib.h>

View File

@ -18,9 +18,9 @@
// implementation of class-less helper functions
//
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include "hud.h"
#include "cl_util.h"

View File

@ -20,9 +20,9 @@
#define UTIL_VECTOR_H
// Misc C-runtime library headers
#include "stdio.h"
#include "stdlib.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
// Header file containing definition of globalvars_t and entvars_t
typedef unsigned int func_t; //

View File

@ -16,7 +16,14 @@
#pragma once
#ifndef MATHLIB_H
#define MATHLIB_H
#ifndef __cplusplus
#include <math.h>
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif // HAVE_TGMATH_H
#else // __cplusplus
#include <cmath>
#endif // __cplusplus
typedef float vec_t;
typedef vec_t vec2_t[2];

View File

@ -60,10 +60,10 @@ typedef int BOOL;
#endif //_WIN32
// Misc C-runtime library headers
#include "stdio.h"
#include "stdlib.h"
#include "stddef.h"
#include "math.h"
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
#include <cmath>
#ifndef M_PI_F
#define M_PI_F (float)M_PI

View File

@ -12,8 +12,12 @@
* without written permission from Valve LLC.
*
****/
#include <math.h>
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
#include "usercmd.h"
#include "pm_defs.h"

View File

@ -13,10 +13,12 @@
*
****/
// pm_math.c -- math primitives
#include "mathlib.h"
#include "const.h"
#include <math.h>
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
// up / down
#define PITCH 0

View File

@ -14,18 +14,22 @@
****/
#include <assert.h>
//#include <stdio.h> // NULL
#include <math.h> // sqrt
#include <string.h> // strcpy
#include <stdlib.h> // atoi
#include <ctype.h> // isspace
#include "mathlib.h"
#ifdef HAVE_TGMATH_H
#include <tgmath.h>
#endif
#include "const.h"
#include "usercmd.h"
#include "pm_defs.h"
#include "pm_shared.h"
#include "pm_movevars.h"
#include "pm_debug.h"
//#include <stdio.h> // NULL
#include <math.h> // sqrt
#include <string.h> // strcpy
#include <stdlib.h> // atoi
#include <ctype.h> // isspace
int g_bhopcap = 1;