36 #include <Inventor/C/errors/debugerror.h>
37 #include <Inventor/C/basic.h>
44 #error You are not compiling C++ - maybe your source file is named <file>.c
66 inline Type SbAbs( Type Val ) {
67 return (Val < 0) ? 0 - Val : Val;
71 inline Type SbMax(
const Type A,
const Type B ) {
72 return (A < B) ? B : A;
76 inline Type SbMin(
const Type A,
const Type B ) {
77 return (A < B) ? A : B;
81 inline Type SbClamp(
const Type Val,
const Type Min,
const Type Max ) {
82 return (Val < Min) ? Min : (Val > Max) ? Max : Val;
86 inline void SbSwap( Type & A, Type & B ) {
87 Type T; T = A; A = B; B = T;
91 inline Type SbSqr(
const Type val) {
105 #include <Inventor/C/errors/debugerror.h>
110 template <
typename Type>
111 inline void SbDividerChk(
const char * funcname, Type divider) {
112 if (!(divider !=
static_cast<Type
>(0)))
113 cc_debugerror_post(funcname,
"divide by zero error.", divider);
116 template <
typename Type>
117 inline void SbDividerChk(
const char *, Type) {}
160 #define SUN_CC_4_0_SOTYPE_INIT_BUG 0
162 #if SUN_CC_4_0_SOTYPE_INIT_BUG
163 #define STATIC_SOTYPE_INIT
165 #define STATIC_SOTYPE_INIT = SoType::badType()
178 __pragma(warning(push)) \
179 __pragma(warning(disable:4127)) \
181 __pragma(warning(pop))
183 #define WHILE_0 while (0)