Index: trunk/src/lib/network/converter.cc
===================================================================
--- trunk/src/lib/network/converter.cc	(revision 6737)
+++ trunk/src/lib/network/converter.cc	(revision 6753)
@@ -200,136 +200,4 @@
 
 /*!
- * Converts a float value into a byte-array
- * @param x: The float which is to convert
- * @return: A byte-array which accords the given float
- */
-byte* Converter::floatToByteArray(float x)
-{
-  byte* result = new byte[4];
-  floatToByteArray(x, result, 4);
-  return result;
-  /*
-  int mantisse = 0;
-  int exponent = 128;
-
-  int sgn;
-  if (x < 0)
-  {
-    x = -x;
-    sgn = -1;
-  }
-  else
-    sgn = 1;
-
-  if (x == 0)
-  {
-    exponent = 255;
-    mantisse = 0;
-  }
-  else
-  {
-    //if (x < getDenormConst())
-    //  printf("Denormalisiert!\n");
-    //printf("DenormConst = %e", getDenormConst());
-
-    float sub = 1;
-    while (sub < x)
-    {
-      sub *= 2;
-      exponent++;
-    }
-
-    while (x > 0)
-    {
-      if (x >= sub)
-      {
-        mantisse += 1;
-        x -= sub;
-      }
-
-      mantisse *= 2;
-      exponent--;
-      sub /= 2;
-    }
-    exponent++;
-    mantisse /= 2;
-
-    printf("Conv:        mantisse = %i exponent = %i \n", mantisse, exponent);
-
-
-    if (mantisse != 0)
-    {
-      while (mantisse < expmult)
-      {
-        mantisse *= 2;
-        exponent--;
-      }
-
-      mantisse -= expmult;
-    }
-  }
-
-  printf("Conv: mantisse = %i exponent = %i \n", mantisse, exponent);
-
-
-  int hx = mantisse + expmult * exponent;
-  byte* result = intToByteArray(hx);
-  if (sgn == -1)
-    result[3] += sgnadd;
-
-  return result;
-  */
-}
-
-
-/*!
- * Converts a byte-array into a float value
- * @param a: The byte-array which is to convert
- * @return: A float value which accords the given byte-array
- */
-float Converter::byteArrayToFloat(byte* a)
-{
-  byte* h = new byte[4];
-  float result = 0.0f;
-  byteArrayToFloat(a, &result);
-  return result;
-  /*
-  int hexp = a[2] + a[3] * 256;
-  int exponent = (hexp / 128) % 256;
-
-  int hmant = a[0] + a[1] * 256 + a[2] * 65536;
-  int mantisse = hmant % expmult;
-  if (mantisse == 0 && exponent == 255)
-    return 0;
-
-  mantisse += expmult;
-  exponent -= 128;
-
-
-  int sgn;
-  if (a[3] >= sgnadd)
-    sgn = -1;
-  else
-    sgn = 1;
-
-  printf("ReConv: mantisse = %i exponent = %i \n", mantisse, exponent);
-
-  float emult = 1;
-  if (exponent > 0)
-    for (int i = 0; i < exponent; i++)
-      emult *= 2;
-  else if (exponent < 0)
-    for (int i = 0; i > exponent; i--)
-      emult /= 2;
-
-  float result = mantisse * emult;
-  if (sgn == -1)
-    result = -result;
-
-  return result;
-  */
-}
-
-/*!
  * Converts a float value into a byte-array and stores the result into a given byte-array
  * @param x: The float which is to convert
@@ -338,5 +206,5 @@
  * @return: The number of written bytes
  */
-int Converter::floatToByteArray(float x, byte* a, int length)
+int Converter::_floatToByteArray(float x, byte* a, int length)
 {
   if (length < FLOATSIZE)
@@ -452,5 +320,5 @@
  * @return: The number of read bytes
  */
-int Converter::byteArrayToFloat(const byte* a, float* x)
+int Converter::_byteArrayToFloat(const byte* a, float* x)
 {
     //handle 0
@@ -527,5 +395,5 @@
  * @return: The number of written bytes
  */
-int Converter::_floatToByteArray(float x, byte* a, int length)
+int Converter::floatToByteArray(float x, byte* a, int length)
 {
   if ( length< FLOATSIZE )
@@ -538,5 +406,5 @@
   for (int i = 0; i < 4; i++)
     a[i] = p[i];
-  
+
   return FLOATSIZE;
 }
@@ -549,5 +417,5 @@
  * @return: The number of read bytes
  */
-int Converter::_byteArrayToFloat(const byte* a, float* x)
+int Converter::byteArrayToFloat(const byte* a, float* x)
 {
   *x = *((float*)a);
@@ -651,16 +519,16 @@
   printf("To Convert: %e\n", x);
 
-  byte* res = floatToByteArray(x);
-  for (int i = 0; i < 4; i++)
-    printf("%i ", res[i]);
-  printf("\n");
-
-  float y = byteArrayToFloat(res);
-  printf("ReConvert: %e\n", y);
-
-  if (x == y)
-    printf("equal\n");
-  else
-    printf("different\n");
+//  byte* res = floatToByteArray(x);
+//   for (int i = 0; i < 4; i++)
+//     printf("%i ", res[i]);
+//   printf("\n");
+
+//  float y = byteArrayToFloat(res);
+//   printf("ReConvert: %e\n", y);
+
+//   if (x == y)
+//     printf("equal\n");
+//   else
+//     printf("different\n");
 }
 
@@ -702,6 +570,6 @@
   //floatTest(-0.0f);
   //floatTest(-5.67e-29f);
-  
-  
+
+
   //floatTest(-45.7e-32f);
   //floatTest(45.7e-33f);
