RetroArch
Macros | Functions | Variables
vector_2.h File Reference
#include <stdint.h>
#include <math.h>
#include <retro_common_api.h>
#include <retro_inline.h>
Include dependency graph for vector_2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define vec2_dot(a, b)   ((a[0] * b[0]) + (a[1] * b[1]))
 
#define vec2_cross(a, b)   ((a[0]*b[1]) - (a[1]*b[0]))
 
#define vec2_add(dst, src)
 
#define vec2_subtract(dst, src)
 
#define vec2_copy(dst, src)
 

Functions

static INLINE float overflow (void)
 
static INLINE int16_t tofloat16 (float f)
 
static INLINE unsigned int vec2_packHalf2x16 (float vec0, float vec1)
 

Variables

RETRO_BEGIN_DECLS typedef float vec2_t [2]
 

Macro Definition Documentation

◆ vec2_add

#define vec2_add (   dst,
  src 
)
Value:
dst[0] += src[0]; \
dst[1] += src[1]
GLenum src
Definition: glext.h:6980
GLenum GLenum dst
Definition: glext.h:6980

◆ vec2_copy

#define vec2_copy (   dst,
  src 
)
Value:
dst[0] = src[0]; \
dst[1] = src[1]
GLenum src
Definition: glext.h:6980
GLenum GLenum dst
Definition: glext.h:6980

◆ vec2_cross

#define vec2_cross (   a,
  b 
)    ((a[0]*b[1]) - (a[1]*b[0]))

◆ vec2_dot

#define vec2_dot (   a,
  b 
)    ((a[0] * b[0]) + (a[1] * b[1]))

◆ vec2_subtract

#define vec2_subtract (   dst,
  src 
)
Value:
dst[0] -= src[0]; \
dst[1] -= src[1]
GLenum src
Definition: glext.h:6980
GLenum GLenum dst
Definition: glext.h:6980

Function Documentation

◆ overflow()

static INLINE float overflow ( void  )
static
Here is the caller graph for this function:

◆ tofloat16()

static INLINE int16_t tofloat16 ( float  f)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vec2_packHalf2x16()

static INLINE unsigned int vec2_packHalf2x16 ( float  vec0,
float  vec1 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ vec2_t

RETRO_BEGIN_DECLS typedef float vec2_t[2]