Hi all,
I need to cast a in16_t to float as a library only supports the math calculations in float. Does the compiler have any effect of this.
Sample code:
{
int16_t a = 10; // recorded data point
float b = 0;
memcpy(&b, &a sizeof(a));
examplefunction(b);
}
Why won't this work?
Cheers,
Matt
I need to cast a in16_t to float as a library only supports the math calculations in float. Does the compiler have any effect of this.
Sample code:
{
int16_t a = 10; // recorded data point
float b = 0;
memcpy(&b, &a sizeof(a));
examplefunction(b);
}
Why won't this work?
Cheers,
Matt
Last edited: