My float map library
fmap.h@0:1e9eea14a6b9, 2010-12-09 (annotated)
- Committer:
- est2fe
- Date:
- Thu Dec 09 14:19:12 2010 +0000
- Revision:
- 0:1e9eea14a6b9
0.9.0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
est2fe | 0:1e9eea14a6b9 | 1 | #ifndef __map_h__ |
est2fe | 0:1e9eea14a6b9 | 2 | #define __map_h__ |
est2fe | 0:1e9eea14a6b9 | 3 | |
est2fe | 0:1e9eea14a6b9 | 4 | typedef struct fmap_s // Map mit variabler Stuetzstellenanzahl |
est2fe | 0:1e9eea14a6b9 | 5 | { |
est2fe | 0:1e9eea14a6b9 | 6 | /* |
est2fe | 0:1e9eea14a6b9 | 7 | Struktur: |
est2fe | 0:1e9eea14a6b9 | 8 | Anzahl Stuetzstellen > = 2 |
est2fe | 0:1e9eea14a6b9 | 9 | float *Kennlinie; // wobei immer im Wechsel x1, y1, x2 y2, x3, y3, ... kommt |
est2fe | 0:1e9eea14a6b9 | 10 | */ |
est2fe | 0:1e9eea14a6b9 | 11 | int groesse; |
est2fe | 0:1e9eea14a6b9 | 12 | float *kl; // Feld mit floats (mind. 2 Stück) |
est2fe | 0:1e9eea14a6b9 | 13 | } fmap_s; |
est2fe | 0:1e9eea14a6b9 | 14 | |
est2fe | 0:1e9eea14a6b9 | 15 | //#define NAN -10000 |
est2fe | 0:1e9eea14a6b9 | 16 | |
est2fe | 0:1e9eea14a6b9 | 17 | fmap_s *new_map (int groesse); |
est2fe | 0:1e9eea14a6b9 | 18 | |
est2fe | 0:1e9eea14a6b9 | 19 | int find_x_Bereich (float x, fmap_s *map); |
est2fe | 0:1e9eea14a6b9 | 20 | float calc_fix_map (float x, int i, fmap_s *map); |
est2fe | 0:1e9eea14a6b9 | 21 | float calc_var_map (float x, fmap_s *map); |
est2fe | 0:1e9eea14a6b9 | 22 | int set_map_val (fmap_s *m, int index, float x, float y); |
est2fe | 0:1e9eea14a6b9 | 23 | |
est2fe | 0:1e9eea14a6b9 | 24 | void free_map (fmap_s *m); |
est2fe | 0:1e9eea14a6b9 | 25 | |
est2fe | 0:1e9eea14a6b9 | 26 | #endif |