我在别的地方看到这样一个转换语句,如下
float kk;
kk = kk*65536*256*1000;
transbuff[51+i*3] = (uchar)kk/65536;
transbuff[52+i*3] = (uchar)(kk - (float) transbuff[51+i*3]*65536)/256;
transbuff[53+i*3] = (uchar)(kk - (float) transbuff[51+i*3]*65536 - (float) transbuff[52+i*3]*256);
如果kk=5.9874,能把它放在数组中吗? |