Commit 78fa4a93 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

rotate: avoid sign extension

parent b306cb2d
...@@ -96,7 +96,7 @@ static void store_trigo( struct filter_sys_t *sys, float f_angle ) ...@@ -96,7 +96,7 @@ static void store_trigo( struct filter_sys_t *sys, float f_angle )
uint16_t i_sin = lroundf(sinf(f_angle) * 4096.f); uint16_t i_sin = lroundf(sinf(f_angle) * 4096.f);
uint16_t i_cos = lroundf(cosf(f_angle) * 4096.f); uint16_t i_cos = lroundf(cosf(f_angle) * 4096.f);
atomic_store( &sys->sincos, (i_cos << 16) | (i_sin << 0)); atomic_store( &sys->sincos, (i_cos << 16u) | (i_sin << 0u));
} }
static void fetch_trigo( struct filter_sys_t *sys, int *i_sin, int *i_cos ) static void fetch_trigo( struct filter_sys_t *sys, int *i_sin, int *i_cos )
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment