gwion-util
utilities for the Gwion project
Loading...
Searching...
No Matches
include
gwcommon.h
Go to the documentation of this file.
1
4
#include <stddef.h>
5
#include <stdlib.h>
6
#include <inttypes.h>
7
#include <float.h>
8
#define GWION_EPSILON FLT_EPSILON
9
/* common typedefs */
10
typedef
intptr_t
m_int
;
11
typedef
uintptr_t
m_uint
;
12
typedef
unsigned
char
m_bit
;
13
typedef
float
m_float
;
14
typedef
char
*
m_str
;
15
typedef
struct
{
m_float
x
, y, z; }
m_vec3
;
16
typedef
struct
{
m_float
x, y, z,
w
; }
m_vec4
;
17
typedef
_Complex
float
m_complex
;
18
#define SZ_INT sizeof(m_uint)
19
#define SZ_FLOAT sizeof(m_float)
20
21
#define INT_F "ti"
22
#define UINT_F "tu"
23
#define abs labs
24
25
/*
26
#if sizeof(m_uint) > sizeof(m_float)
27
#define SZ_MINVAL SZ_INT
28
#else
29
#define SZ_MINVAL SZ_FLOAT
30
#endif
31
*/
m_complex
_Complex float m_complex
Definition
gwcommon.h:17
m_uint
uintptr_t m_uint
Definition
gwcommon.h:11
m_float
float m_float
Definition
gwcommon.h:13
m_str
char * m_str
Definition
gwcommon.h:14
m_bit
unsigned char m_bit
Definition
gwcommon.h:12
m_int
intptr_t m_int
Definition
gwcommon.h:10
m_vec3
Definition
gwcommon.h:15
m_vec3::x
m_float x
Definition
gwcommon.h:15
m_vec4
Definition
gwcommon.h:16
m_vec4::w
m_float w
Definition
gwcommon.h:16
Generated by
1.10.0