Mercurial > hg > fxanalyse
comparison utils.h @ 144:be87c8e78266
Code cleanup
author | Daniele Nicolodi <daniele.nicolodi@obspm.fr> |
---|---|
date | Wed, 22 Jan 2014 14:45:24 +0100 |
parents | |
children | 97112b45b838 |
comparison
equal
deleted
inserted
replaced
143:09a4548e1436 | 144:be87c8e78266 |
---|---|
1 #ifndef __FXANALISE_UTILS_H__ | |
2 #define __FXANALISE_UTILS_H__ | |
3 | |
4 #ifndef FALSE | |
5 #define FALSE 0 | |
6 #endif | |
7 #ifndef TRUE | |
8 #define TRUE 1 | |
9 #endif | |
10 | |
11 #ifndef MIN | |
12 #define MIN(x, y) (x) < (y) ? (x) : (y) | |
13 #endif | |
14 | |
15 /* format floating points numbers accordingly to fmt and asdd thousands separator */ | |
16 const char * thousands(char *buffer, int size, char *fmt, double val); | |
17 | |
18 /* MJD functiom used by the Sr programs */ | |
19 static inline double utc2mjd(double utc) | |
20 { | |
21 return 15020.0 + utc / 86400.0; | |
22 } | |
23 | |
24 double Peta(double x); | |
25 double Tera(double x); | |
26 double Giga(double x); | |
27 double Mega(double x); | |
28 double kilo(double x); | |
29 double milli(double x); | |
30 double micro(double x); | |
31 double nano(double x); | |
32 double pico(double x); | |
33 double femto(double x); | |
34 double atto(double x); | |
35 | |
36 #endif |