Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6mathlib.h
Go to the documentation of this file.
1 
10 #ifndef P6MATHLIB_H__
11 #define P6MATHLIB_H__ 1
12 
13 #include "p6com.h"
14 
15 namespace P6R {
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
28 const P6MATHLIBFLAGS P6MATHLIB_NOFLAGS = 0x00000000;
29 
30 
36 interface p6IMathlib : public p6ICom
37 {
48  P6COMMETHOD initialize( P6MATHLIBFLAGS flags ) = 0;
49 
63  P6COMMETHOD round( P6FLOAT withDecimal, P6INT32* pToInteger ) = 0;
64 
91  P6COMMETHOD roundHalfToEven( P6FLOAT withDecimal, P6INT32 precision, P6FLOAT* pRound ) = 0;
92 
116  P6COMMETHOD roundHalfToEvenInt( P6INT32 noDecimal, P6INT32 precision, P6INT32* pRound ) = 0;
117 };
118 
119 
120 // {D69A4C7E-DBB9-487f-A57F-EB54008A0D8F}
121 #define IF_p6IMathlib {0xd69a4c7e,0xdbb9,0x487f,{0xa5,0x7f,0xeb,0x54,0x0,0x8a,0xd,0x8f}}
122 
123 // {A2132278-C115-478d-B933-2081DD3864F3}
124 #define COMP_p6Mathlib {0xa2132278,0xc115,0x478d,{0xb9,0x33,0x20,0x81,0xdd,0x38,0x64,0xf3}}
125 
126 #ifdef __cplusplus
127 }
128 #endif
129 
130 } // namespace
131 
132 #endif
133 
134 
135 
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR roundHalfToEvenInt(P6INT32 noDecimal, P6INT32 precision, P6INT32 *pRound)=0
This method performs rounding to a specified number of decimal points for an integer (i...
C++ does not provide rounding functions, we provide them here including round half to even...
Definition: p6mathlib.h:36
int P6INT32
Definition: p6types.h:41
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR roundHalfToEven(P6FLOAT withDecimal, P6INT32 precision, P6FLOAT *pRound)=0
This method performs rounding to a specified number of decimal points (i.e., the precision parameter)...
virtual P6R::P6ERR round(P6FLOAT withDecimal, P6INT32 *pToInteger)=0
Return the closest integer to the floating point "withDecimal" parameter.
P6UINT32 P6MATHLIBFLAGS
P6MATHLIBFLAGS.
Definition: p6mathlib.h:27
const P6MATHLIBFLAGS P6MATHLIB_NOFLAGS
Definition: p6mathlib.h:28
#define P6COMMETHOD
Definition: p6types.h:872
double P6FLOAT
Definition: p6types.h:63
virtual P6R::P6ERR initialize(P6MATHLIBFLAGS flags)=0
This function ensures that this object is in its proper initial state.
P6COM definitions and interfaces.