Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6108 in orxonox.OLD for branches/network/src/lib


Ignore:
Timestamp:
Dec 14, 2005, 3:17:36 PM (18 years ago)
Author:
bwuest
Message:

Converter.h and Converter.cc changed. They should now function for both positive and negative numbers

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/network/src/lib/network/converter.cc

    r6106 r6108  
    8989  const int step = 256; // = 2 ^ 8
    9090  int result = 0;
    91   for (int i = 0; i < INTSIZE - 2; i++)
     91  for (int i = 0; i < INTSIZE - 1; i++)
    9292  {
    9393    result += a[i] * mult;
     
    9595  }
    9696 
    97   if (a[INTSIZE - 1] > sgnadd)
     97  printf("tara: %i", result);
     98 
     99  if (a[INTSIZE - 1] >= sgnadd)
    98100  {
    99101    result += (a[INTSIZE - 1] - sgnadd) * mult;
Note: See TracChangeset for help on using the changeset viewer.