Update of example Extern_C
parent
3b81368074
commit
0a65ffc8e2
@ -1,21 +1,22 @@
|
||||
#include <math.h>
|
||||
#include "mathext.h"
|
||||
|
||||
void mycos_step(float a, mycos_out *out)
|
||||
void Mathext__mycos_step(float a, Mathext__mycos_out *out)
|
||||
{
|
||||
out->o = cos(a);
|
||||
out->o = cosf(a);
|
||||
}
|
||||
|
||||
void st_cos_reset(st_cos_mem *self)
|
||||
void Mathext__st_cos_reset(Mathext__st_cos_mem *self)
|
||||
{
|
||||
int j;
|
||||
self->i = 0;
|
||||
for(int j = 0; j < 100; ++j)
|
||||
for(j = 0; j < 100; ++j)
|
||||
self->mem[j] = 0.0;
|
||||
}
|
||||
|
||||
void st_cos_step(float a, st_cos_out *out, st_cos_mem *self)
|
||||
void Mathext__st_cos_step(float a, Mathext__st_cos_out *out, Mathext__st_cos_mem *self)
|
||||
{
|
||||
out->o = self->mem[self->i];
|
||||
self->i = (self->i+1) % 100;
|
||||
self->mem[self->i] = cos(a);
|
||||
self->mem[self->i] = cosf(a);
|
||||
}
|
||||
|
Loading…
Reference in New Issue