IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30576


Ignore:
Timestamp:
Feb 11, 2011, 2:35:26 PM (15 years ago)
Author:
eugene
Message:

use opihi_flt and opihi_int for casting to avoid losing precision

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/Ohana/src/opihi/cmd.data/write_vectors.c

    r20936 r30576  
    140140      if (fmttype[j] == 'd') {
    141141        if (vec[j][0].type == OPIHI_FLT) {
    142           fprintf (f, fmtlist[j], (int)(vec[j][0].elements.Flt[i]));
     142          fprintf (f, fmtlist[j], (opihi_int)(vec[j][0].elements.Flt[i]));
    143143        } else {
    144           fprintf (f, fmtlist[j], (int)(vec[j][0].elements.Int[i]));
     144          fprintf (f, fmtlist[j], (opihi_int)(vec[j][0].elements.Int[i]));
    145145        }
    146146      }
    147147      if (fmttype[j] == 'f') {
    148148        if (vec[j][0].type == OPIHI_FLT) {
    149           fprintf (f, fmtlist[j], (float)(vec[j][0].elements.Flt[i]));
     149          fprintf (f, fmtlist[j], (opihi_flt)(vec[j][0].elements.Flt[i]));
    150150        } else {
    151           fprintf (f, fmtlist[j], (float)(vec[j][0].elements.Int[i]));
     151          fprintf (f, fmtlist[j], (opihi_flt)(vec[j][0].elements.Int[i]));
    152152        }
    153153      }
Note: See TracChangeset for help on using the changeset viewer.