Fixed Point Arithmetic  0
Fixed-point math library.
Macros
Function-generating macros.

Macros

#define MAKE_VEC_VEC_F3(name, typeR, typeA, typeB, f)
 Macro to create functions with element by element operations between vectors. More...
 
#define MAKE_VEC_VEC_F(name, type, f)   MAKE_VEC_VEC_F3(name, type, type, type, f)
 Macro to create functions with element by element operations between vectors. More...
 
#define MAKE_VEC_SCALAR_F2(name, typeR, typeA, typeB, f)
 Macro to create functions with function-operations between vectors and scalars. More...
 
#define MAKE_VEC_SCALAR_F(name, typeA, typeB, f)   MAKE_VEC_SCALAR_F2(name, typeA, typeA, typeB, f)
 Macro to create functions with function-operations between vectors and scalars. More...
 
#define MAKE_VEC_ELEM_F(name, typeR, typeA, f)
 Macro to make a function that applies a scalar function to all elements of a vector. More...
 

Detailed Description

Macro Definition Documentation

◆ MAKE_VEC_ELEM_F

#define MAKE_VEC_ELEM_F (   name,
  typeR,
  typeA,
 
)
Value:
FXP_DECLARATION(_FXP_INLINE_KW typeR name(typeA a)) \
{ \
typeR r; \
r.x = f(a.x); \
r.y = f(a.y); \
r.z = f(a.z); \
return r; \
}
#define FXP_DECLARATION
Definition: vector.h:143
#define _FXP_INLINE_KW
Definition: vector.h:138

Macro to make a function that applies a scalar function to all elements of a vector.

Parameters
nameName of the function.
typeRReturn type.
typeAType of argument.
fName of the function that will be applied.

Definition at line 121 of file vector.h.

◆ MAKE_VEC_SCALAR_F

#define MAKE_VEC_SCALAR_F (   name,
  typeA,
  typeB,
 
)    MAKE_VEC_SCALAR_F2(name, typeA, typeA, typeB, f)

Macro to create functions with function-operations between vectors and scalars.

Parameters
nameName of the function to be defined.
typeAType of first argument and return type.
typeBType of second arguments.
fName of the function to be applied.

Definition at line 109 of file vector.h.

◆ MAKE_VEC_SCALAR_F2

#define MAKE_VEC_SCALAR_F2 (   name,
  typeR,
  typeA,
  typeB,
 
)
Value:
FXP_DECLARATION(_FXP_INLINE_KW typeR name(typeA a, typeB b)) \
{ \
typeR r; \
r.x = f(a.x, b); \
r.y = f(a.y, b); \
r.z = f(a.z, b); \
return r; \
}
#define FXP_DECLARATION
Definition: vector.h:143
#define _FXP_INLINE_KW
Definition: vector.h:138

Macro to create functions with function-operations between vectors and scalars.

Parameters
nameName of the function.
typeRReturn type.
typeAType of first argument.
typeBType of second argument.
fName of the function that will be applied.

Definition at line 91 of file vector.h.

◆ MAKE_VEC_VEC_F

#define MAKE_VEC_VEC_F (   name,
  type,
 
)    MAKE_VEC_VEC_F3(name, type, type, type, f)

Macro to create functions with element by element operations between vectors.

Parameters
nameName of the function to be defined.
typeType of arguments and return value.
fName of the function to be applied.

Definition at line 80 of file vector.h.

◆ MAKE_VEC_VEC_F3

#define MAKE_VEC_VEC_F3 (   name,
  typeR,
  typeA,
  typeB,
 
)
Value:
FXP_DECLARATION(_FXP_INLINE_KW typeR name(typeA a, typeB b)) \
{ \
typeR r; \
r.x = f(a.x, b.x); \
r.y = f(a.y, b.y); \
r.z = f(a.z, b.z); \
return r; \
}
#define FXP_DECLARATION
Definition: vector.h:143
#define _FXP_INLINE_KW
Definition: vector.h:138

Macro to create functions with element by element operations between vectors.

Parameters
nameName of the function to be defined.
typeRType of return value.
typeAType of first argument.
typeBType of second argument.
fName of the function to be applied.

Definition at line 63 of file vector.h.