Header file that contains all common definitions. More...
Go to the source code of this file.
Macros | |
#define | __BASE_FILE__ __FILE__ |
#define | FALSE (0) |
#define | NULL (0) |
#define | SBG_ARRAY_SIZE(a) (sizeof(a) / sizeof((a)[0])) |
#define | SBG_DELETE if (p){free(p); (p) = NULL;} |
#define | SBG_DELETE_ARRAY if (p){free(p); (p) = NULL;} |
#define | SBG_DEPRECATED(func) func |
#define | SBG_DEPRECATED_MACRO(func) func |
#define | SBG_DISABLE (0) |
#define | SBG_ENABLE (1) |
#define | SBG_FREE(p) if (p){free(p); (p) = NULL;} |
#define | SBG_FREE_ARRAY(p) if (p){free(p); (p) = NULL;} |
#define | SBG_INLINE static inline |
#define | SBG_INVALID_HANDLE (0x00000000u) |
#define | SBG_NOT_FOUND (0xFFFFFFFFu) |
#define | SBG_PI 3.14159265358979323846 |
#define | SBG_PI_F 3.14159265358979323846f |
#define | SBG_UNDEFINED (0xFFFFFFFFu) |
#define | SBG_UNUSED_PARAMETER(x) (void)(x) |
#define | sbgClamp(value, minValue, maxValue) (((value) < (minValue))?(minValue): ((value) > (maxValue)?maxValue:value)) |
#define | sbgMax(a, b) (((a) > (b)) ? (a) : (b)) |
#define | sbgMin(a, b) (((a) < (b)) ? (a) : (b)) |
#define | TRUE (1) |
Functions | |
SBG_INLINE double | sbgDegToRadD (double angle) |
SBG_INLINE float | sbgDegToRadF (float angle) |
SBG_INLINE double | sbgRadToDegD (double angle) |
SBG_INLINE float | sbgRadToDegF (float angle) |
Header file that contains all common definitions.
Copyright (C) 2007-2015, SBG Systems SAS. All rights reserved.
This source code is intended for use only by SBG Systems SAS and those that have explicit written permission to use it from SBG Systems SAS.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
Definition in file sbgDefines.h.
#define __BASE_FILE__ __FILE__ |
BASE_FILE is gcc specific
Definition at line 67 of file sbgDefines.h.
#define FALSE (0) |
Definition at line 35 of file sbgDefines.h.
#define NULL (0) |
Definition at line 43 of file sbgDefines.h.
#define SBG_ARRAY_SIZE | ( | a | ) | (sizeof(a) / sizeof((a)[0])) |
Definition at line 59 of file sbgDefines.h.
#define SBG_DELETE if (p){free(p); (p) = NULL;} |
Definition at line 77 of file sbgDefines.h.
#define SBG_DELETE_ARRAY if (p){free(p); (p) = NULL;} |
Definition at line 78 of file sbgDefines.h.
#define SBG_DEPRECATED | ( | func | ) | func |
This macro is used to define a new section of packed structures. All structures defined after this macro will be packed.
This macro is used to specify that a structure is packed.
This macro is used to close the section of packed structures and return to the default packing.
Macro used to indicate that a function is deprecated.
Definition at line 156 of file sbgDefines.h.
#define SBG_DEPRECATED_MACRO | ( | func | ) | func |
Macro used to indicate that a macro is deprecated.
Definition at line 168 of file sbgDefines.h.
#define SBG_DISABLE (0) |
Definition at line 27 of file sbgDefines.h.
#define SBG_ENABLE (1) |
Definition at line 31 of file sbgDefines.h.
#define SBG_FREE | ( | p | ) | if (p){free(p); (p) = NULL;} |
Definition at line 79 of file sbgDefines.h.
#define SBG_FREE_ARRAY | ( | p | ) | if (p){free(p); (p) = NULL;} |
Definition at line 80 of file sbgDefines.h.
#define SBG_INLINE static inline |
Macro used to abstract the compiler specific inline keyword.
Definition at line 94 of file sbgDefines.h.
#define SBG_INVALID_HANDLE (0x00000000u) |
Definition at line 47 of file sbgDefines.h.
#define SBG_NOT_FOUND (0xFFFFFFFFu) |
Definition at line 51 of file sbgDefines.h.
#define SBG_PI 3.14159265358979323846 |
Definition at line 175 of file sbgDefines.h.
#define SBG_PI_F 3.14159265358979323846f |
Definition at line 179 of file sbgDefines.h.
#define SBG_UNDEFINED (0xFFFFFFFFu) |
Definition at line 55 of file sbgDefines.h.
#define SBG_UNUSED_PARAMETER | ( | x | ) | (void)(x) |
Macro used to avoid compiler warning when a variable is not used.
Definition at line 102 of file sbgDefines.h.
#define sbgClamp | ( | value, | |
minValue, | |||
maxValue | |||
) | (((value) < (minValue))?(minValue): ((value) > (maxValue)?maxValue:value)) |
Clamp a value between minValue and maxValue ie minValue <= value <= maxValue
[in] | value | First operand. |
[in] | minValue | First operand. |
[in] | maxValue | Second operand. |
Definition at line 210 of file sbgDefines.h.
#define sbgMax | ( | a, | |
b | |||
) | (((a) > (b)) ? (a) : (b)) |
Returns the maximum between a and b
[in] | a | First operand. |
[in] | b | Second operand. |
Definition at line 189 of file sbgDefines.h.
#define sbgMin | ( | a, | |
b | |||
) | (((a) < (b)) ? (a) : (b)) |
Returns the minimum between a and b
[in] | a | First operand. |
[in] | b | Second operand. |
Definition at line 199 of file sbgDefines.h.
#define TRUE (1) |
Definition at line 39 of file sbgDefines.h.
SBG_INLINE double sbgDegToRadD | ( | double | angle | ) |
Convert an angle from degrees to radians using double precision.
[in] | angle | The angle to convert in degrees. |
Definition at line 228 of file sbgDefines.h.
SBG_INLINE float sbgDegToRadF | ( | float | angle | ) |
Convert an angle from degrees to radians using single (float) precision.
[in] | angle | The angle to convert in degrees. |
Definition at line 248 of file sbgDefines.h.
SBG_INLINE double sbgRadToDegD | ( | double | angle | ) |
Convert an angle from radians to degrees using double precision.
[in] | angle | The angle to convert in radians. |
Definition at line 218 of file sbgDefines.h.
SBG_INLINE float sbgRadToDegF | ( | float | angle | ) |
Convert an angle from radians to degrees using single (float) precision.
[in] | angle | The angle to convert in radians. |
Definition at line 238 of file sbgDefines.h.