单精度转双精度的警告

2019-07-20 06:26发布

STM32F407,使用了DSP库,有一个公式在编译时有警告:protocol.c(793): warning:  #1035-D: single-precision operand implicitly converted to double-precision,查阅了资料知道需要在数字后面加个f才能解决这个警告,但我这个公式,怎么能加f了。能帮我看下这个该怎么改下了?


float depth0 = 0x0;
u8 vertical_height = 0x0;
u8 pull_down_len = 0x0;
float y_angle1 = 0;
depth0 = (float)(vertical_height+pull_down_len*arm_sin_f32(y_angle1*pi/180));
友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。