Shao Rui
/
Kalman
1
defining.h
- Committer:
- shaorui
- Date:
- 2020-02-07
- Revision:
- 0:c55310328157
File content as of revision 0:c55310328157:
#ifndef __defining__ #define __defining__ /*===============================================================*/ /*define type */ /*bool type*/ enum Bool_{ False=0, True=1, }; typedef enum Bool_ Bool; /*矩阵,向量,四元数*/ typedef double (*Mat3)[3]; typedef double *Vec3,*Quat,*Vec,*Mat,*Point,*Point3; typedef const double (*cMat3)[3]; typedef const double *cVec3,*cQuat,*cVec,*cMat,*cPoint,*cPoint3; typedef int (*nMat3)[3]; typedef int *nVec3,*nQuat,*nVec,*nMat,*nPoint,*nPoint3; typedef const int (*cnMat3)[3]; typedef const int *cnVec3,*cnQuat,*cnVec,*cnMat,*cnPoint,*cnPoint3; /*复数*/ typedef struct Complex_{ double real; double img; }Complex; /*===============================================================*/ /*宏定义 */ #ifndef NULL #define NULL 0 #endif #ifndef MAX_PATH #define MAX_PATH 260 #endif /* #ifndef UNUSED #define UNUSED(x) (x=x) #endif */ #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) #endif #ifndef MGet #define MGet(p,i,j,n) (p[(i)*(n)+(j)]) /*n列矩阵的(i,j)元素*/ #endif /*===============================================================*/ /*数学常数宏 pi - 圆周率 pi2 - pi的两倍 ee - 自然对数底 */ /*创建时间: 20061122 最近更改时间:20070525 Copyright 2006-2010 SSTC */ #ifndef pi #define pi 3.1415926535897932384626433832795 #endif #ifndef pi2 #define pi2 6.2831853071795864769252867665590 #endif #ifndef ee #define ee 2.7182818284590455348848081484903 #endif #endif