heptagon/examples/extern_C/mathext.h

26 lines
560 B
C
Raw Normal View History

2010-07-27 11:32:58 +02:00
#ifndef MATHEXT_H
#define MATHEXT_H
2010-07-27 11:32:58 +02:00
/* Example of a combinatorial function */
2015-09-17 17:20:31 +02:00
typedef struct Mathext__mycos_out {
float o;
2015-09-17 17:20:31 +02:00
} Mathext__mycos_out;
2010-07-27 11:32:58 +02:00
2015-09-17 17:20:31 +02:00
void Mathext__mycos_step(float a, Mathext__mycos_out *o);
2010-07-27 11:32:58 +02:00
/* Example of a statefull function. */
2015-09-17 17:20:31 +02:00
typedef struct Mathext__st_cos_out {
2010-07-27 11:32:58 +02:00
float o;
2015-09-17 17:20:31 +02:00
} Mathext__st_cos_out;
2010-07-27 11:32:58 +02:00
2015-09-17 17:20:31 +02:00
typedef struct Mathext__st_cos_mem {
2010-07-27 11:32:58 +02:00
int i;
float mem[100];
2015-09-17 17:20:31 +02:00
} Mathext__st_cos_mem;
2010-07-27 11:32:58 +02:00
2015-09-17 17:20:31 +02:00
void Mathext__st_cos_reset(Mathext__st_cos_mem *self);
void Mathext__st_cos_step(float a, Mathext__st_cos_out *out, Mathext__st_cos_mem *self);
2010-07-27 11:32:58 +02:00
#endif