GemaCoreLib
The GeMA Core library
gmMathUtils.h
Go to the documentation of this file.
1 /************************************************************************
2 **
3 ** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4 ** All rights reserved.
5 **
6 ** This file is part of the "GeMA" software. It's use should respect
7 ** the terms in the license agreement that can be found together
8 ** with this source code.
9 ** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10 ** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11 ** A PARTICULAR PURPOSE.
12 **
13 ************************************************************************/
14 
24 #ifndef _GEMA_MATH_UTILS_H_
25 #define _GEMA_MATH_UTILS_H_
26 
27 #include "gmLog.h"
28 
30 namespace GmMathUtils
31 {
32  GMC_API_EXPORT int sign(double a);
33 
34  GMC_API_EXPORT char bit_enum_find(unsigned list, unsigned item);
35  GMC_API_EXPORT bool bit_enum_find(unsigned list, unsigned item, char& pos);
36  GMC_API_EXPORT char bit_enum_count(unsigned list, unsigned last);
37 }
38 
39 #endif
char bit_enum_find(unsigned list, unsigned item)
returns the position of an item in a list
Definition: gmMathUtils.cpp:35
Groups utilitary routines for working with numbers.
Definition: gmMathUtils.cpp:26
char bit_enum_count(unsigned list, unsigned last)
return the number of itens in a list
Definition: gmMathUtils.cpp:67
int sign(double a)
returns the sign of a double
Definition: gmMathUtils.cpp:29
#define GMC_API_EXPORT
Macro for controling if the class is being exported (GEMA_CORE_LIB defined) or imported (GEMA_CORE_LI...
Definition: gmCoreConfig.h:35
Declaration of support functions and macros for information logging.