Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 6225 in orxonox.OLD for branches/network


Ignore:
Timestamp:
Dec 21, 2005, 2:08:24 PM (19 years ago)
Author:
bwuest
Message:

Take my converter.h!

Location:
branches/network/src
Files:
3 edited

Legend:

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

    r6219 r6225  
    2525    static int byteArrayToInt(const byte* a);
    2626
    27     //byte* floatToByteArray(float x);
    28     //float byteArrayToFloat(byte[] a);
     27    static int intToByteArray(int x, byte* a, int length);
     28    static int byteArrayToInt(byte* a, int* x);
    2929
     30    static int floatToByteArray(float x, byte* a, int length);
     31    static int byteArrayToFloat(byte* a, float* x);
     32   
    3033    //Test
    3134    static char* floatToBinString(float x);
  • branches/network/src/subprojects/network/Makefile.am

    r6139 r6225  
    2222                  $(MAINSRCDIR)/lib/lang/class_list.cc \
    2323                  $(MAINSRCDIR)/util/loading/load_param.cc \
     24                  $(MAINSRCDIR)/util/loading/factory.cc \
    2425                  $(MAINSRCDIR)/lib/util/substring.cc \
    2526                  $(MAINSRCDIR)/util/loading/load_param_description.cc \
  • branches/network/src/subprojects/network/network_unit_test.cc

    r6197 r6225  
    389389  printf("ReConvert: %f \n", b);
    390390  */
    391   testFloatConverter2(12.3f); printf("\n");
    392   testFloatConverter2(134.25f); printf("\n");
    393   testFloatConverter2(35.67e14f); printf("\n");
     391  testFloatConverter(12.3e-53f); printf("\n");
     392  testFloatConverter(134.26455646546548741661675165f); printf("\n");
     393  testFloatConverter(35.67e14f); printf("\n");
    394394 
    395395  return 0;
Note: See TracChangeset for help on using the changeset viewer.