Adds two numbers together.
# define fbextPP_Add( lhs, rhs ) FBEXT_PP_REPEAT(rhs, fbextPP_Add_L, __) lhs FBEXT_PP_REPEAT(rhs, fbextPP_Add_R, __)
Converts an Angle to Radians.
#define FBEXT_ANGLE_TO_RADIAN( x ) (x) * pi_180
This macro expands to the name of the fbext_Array type.
# define fbext_Array( targs_ ) fbext_TemplateID( Array, targs_, fbext_Array_DefaultTArgs() )
This macro expands to the definition of the fbext_Array class.
# macro fbext_Array_Declare( T_, Allocator_ )
Returns the data (a tuple) portion of an array.
# define fbextPP_ArrayData( array ) FBEXT_PP_TUPLE_ELEM(2, 1, array)
Returns a certain element in an array.
# define fbextPP_ArrayElem( array, index ) fbextPP_TupleElem(fbextPP_ArraySize(array), index, fbextPP_ArrayData(array))
Adds an element to the end of an array.
# define fbextPP_ArrayPushBack( array, value ) _fbextPP_ArrayPushBack_aux(array, value, fbextPP_ArraySize(array))
Adds an element to the beginning of an array.
# define fbextPP_ArrayPushFront( array, elem ) fbextPP_ArrayPushFront__S(array, elem, FBEXT_PP_ARRAY_SIZE(array))
for every `n` in the range [0, array.size), do `array[n] = iif(n <> index, array[n], value)`
# define fbextPP_ArrayReplace( array, index, value ) ( fbextPP_ArraySize(array), fbextPP_TupleReplace(fbextPP_ArraySize(array), index, fbextPP_ArrayData(array), value) )
Reverses the elements in an array.
# define fbextPP_ArrayReverse( array ) ( FBEXT_PP_ARRAY_SIZE(array), FBEXT_PP_TUPLE_REVERSE(FBEXT_PP_ARRAY_SIZE(array), FBEXT_PP_ARRAY_DATA(array)) )
Returns the size, in elements, of an array.
# define fbextPP_ArraySize( array ) fbextPP_TupleElem(2, 0, array)
Expands to a comma (,)
# define fbextPP_Comma() ,
Decrements a number.
# define fbextPP_Dec( n ) fbextPP_Dec__##n
Declares member operators new and delete.
# macro FBEXT_DECLARE_PLACEMENT_NEWDEL( T_ )
Defines member operators new and delete.
# macro FBEXT_DEFINE_PLACEMENT_NEWDEL( T_ )
Debug printing macro, when compiled with -g this will print to standard error.
#macro FBEXT_DPRINT( x )
is deprecated.
# define FBEXT_PP_EQUAL( a, b ) fbextPP_Equal(a, b)
# define fbextPP_ExprIf( cond, expr ) fbextPP_ExprIif(FBEXT_PP_BOOL(cond), expr)
# define fbextPP_ExprIif( bit, expr ) _fbextPP_ExprIif_I(bit, expr)
Clear way to gain a pointer to a FBGFX image’s pixels of any type.
#define FBEXT_FBGFX_PIXELPTR( t, v ) cast( t ptr, (v) + 1 )
Compares two floating-point values for inequality.
# define FBEXT_FLOAT_NOTEQUAL( a, b ) (not FBEXT_FLOAT_EQUAL(a, b))
A preprocessor sequence of floating-point types.
# define fbext_FloatTypes( ) (((single)))(((double)))
expands to `1` if a compares greater than or equal to b, otherwise it expands to `0`.
# define fbextPP_GreaterThan( a, b ) fbextPP_LessThan(b, a)
is deprecated.
# define FBEXT_PP_GREATERTHAN( a, b ) fbextPP_GreaterThan(a, b)
Expands one of two texts depending on a numeric condition.
# define fbextPP_If( c, t, f ) fbextPP_Iif(fbextPP_Bool(c), t, f)
Expands one of two texts depending on a boolean condition.
# define fbextPP_Iif( c, t, f ) fbextPP_Iif__##c(t, f)
Increments a number.
# define fbextPP_Inc( n ) fbextPP_Inc__##n
Fully instanciates the template tname_ with arguments targs_.
# macro fbext_Instanciate( tname_, targs_ )
Fully instanciates the template tname_ with each set of arguments in seq_of_targs_.
# macro fbext_InstanciateMulti( tname_, seq_of_targs_ )
A preprocessor sequence of integral types.
# define fbext_IntegralTypes( ) fbext_UnsignedIntegralTypes() fbext_SignedIntegralTypes()
Determines if a type is an intrinsic floating-point type.
# define FBEXT_IS_FLOATINGPOINT( T_ ) ((typeof(T_) = typeof(single)) or (typeof(T_) = typeof(double)))
Determines if a type is an intrinsic integral type.
# define FBEXT_IS_INTEGRAL( T_ ) (FBEXT_IS_UNSIGNED(T_) or FBEXT_IS_SIGNED(T_))
Determines if a type is an instrinic type.
# define FBEXT_IS_INTRINSIC( T_ ) (FBEXT_IS_NUMERIC(T_) or (T_ = string))
Determines if a type is an intrinsic numeric type.
# define FBEXT_IS_NUMERIC( T_ ) (FBEXT_IS_INTEGRAL(T_) or FBEXT_IS_FLOATINGPOINT(T_))
Determines if a type is an intrinsic signed integral type.
# define FBEXT_IS_SIGNED( T_ ) ( (typeof(T_) = typeof(byte)) or (typeof(T_) = typeof(short)) or (typeof(T_) = typeof(integer)) or (typeof(T_) = typeof(long)) or (typeof(T_) = typeof(longint)) )
Determines a type’s simplicity (a type is simple if it is an intrinsic type that can be bit-copied).
# define FBEXT_IS_SIMPLE( T_ ) (FBEXT_IS_NUMERIC(T_))
Determines if a type is an intrinsic unsigned integral type.
# define FBEXT_IS_UNSIGNED( T_ ) ( (typeof(T_) = typeof(ubyte)) or (typeof(T_) = typeof(ushort)) or (typeof(T_) = typeof(uinteger)) or (typeof(T_) = typeof(ulong)) or (typeof(T_) = typeof(ulongint)) )
Multiplies two numbers together.
# define fbextPP_Mul( lhs, rhs ) FBEXT_PP_REPEAT(FBEXT_PP_DEC(rhs), fbextPP_Mul__L, __) lhs FBEXT_PP_REPEAT(FBEXT_PP_DEC(rhs), fbextPP_Mul__R, lhs)
expands to `1` if a and b do not compare equal, otherwise it expands to `0`.
# define fbextPP_NotEqual( a, b ) fbextPP_Not(fbextPP_Equal(a, b))
is deprecated, use fbextPP_NotEqual instead.
# define FBEXT_PP_NOTEQUAL( a, b ) fbextPP_NotEqual(a, b)
A preprocessor sequence of numeric types.
# define fbext_NumericTypes( ) fbext_IntegralTypes() fbext_FloatTypes()
Converts a Radian to an Angle.
#define FBEXT_RADIAN_TO_ANGLE( x ) (x) * inv_pi_180
Expands a macro a number of times.
# define fbextPP_Repeat( c, m, data ) FBEXT_PP_CAT(fbextPP_Repeat__, c)(m, data, 0)