Float to 2 decimal number

Hello. I'm using NEO-M8N with Arduino mega(2560) and printing gps.speed.kmph() value to GLCD. By using GLCD library and Tinygps++ I'm getting "gps.speed.kmph()" value as like 0.124567 (seems float in the library)

I want it to be like "0.12". I have used round((gps.speed.kmph()*10000.0)/10000.0) & roundf((gps.speed.kmph()*10000.0)/10000.0) but I only get integer value ( 0 or 1 because I'm not moving). I checked the forum aswell, there are some tips but they don't seems to work.

Why could it be? Here is the code;

#include <Wire.h>
#include <TinyGPS++.h>
#include <TinyGPS.h>
#include <SoftwareSerial.h>
#include <openGLCD.h>
#include <stdlib.h>
#include <EEPROM.h>
TinyGPSPlus gps;

//EEPROM
int address = 0 ;
int kontrol ;
int addresscounter ;
int addresswrite ;

static const int MAX_SATELLITES = 40;

TinyGPSCustom totalGPGSVMessages(gps, "GPGSV", 1);
TinyGPSCustom messageNumber(gps, "GPGSV", 2);      // $GPGSV sentence, second element
TinyGPSCustom satsInView(gps, "GPGSV", 3);         // $GPGSV sentence, third element
TinyGPSCustom satNumber[4]; // to be initialized later
TinyGPSCustom elevation[4];
TinyGPSCustom azimuth[4];
TinyGPSCustom snr[4];

struct
{
  bool active;
  int elevation;
  int azimuth;
  int snr;
} sats[MAX_SATELLITES];
//LCD


//GPS
int RXPin = 52;
int TXPin = 53;
int GPSBaud = 9600;

SoftwareSerial gpsSerial(53, 52);

//Haversine
double Radius = 6371e3;
double lat1, lat2;
double long1, long2;
double latitude1, latitude2;
double longitude1, longitude2;
double rad;
double del_lat, del_long;
double var_a;
double var_c;
double var_d;

double c_dist1, t_dist1 = 0;
double c_dist2, t_dist2 = 0;

double lat_conv1, lat_conv2, long_conv1, long_conv2;

double curr_speed;
double avg_speed;
double pre_speed = 0;
double speed_counter = 1;

int count = 1;
void setup()
{ GLCD.Init();
  GLCD.Init(NON_INVERTED);
  GLCD.SelectFont(System5x7);
  Serial.begin(9600);
  delay(10);
  gpsSerial.begin(GPSBaud);
  for (int i = 0; i < 4; ++i)
  {
    satNumber[i].begin(gps, "GPGSV", 4 + 4 * i); // offsets 4, 8, 12, 16
    elevation[i].begin(gps, "GPGSV", 5 + 4 * i); // offsets 5, 9, 13, 17
    azimuth[i].begin(  gps, "GPGSV", 6 + 4 * i); // offsets 6, 10, 14, 18
    snr[i].begin(      gps, "GPGSV", 7 + 4 * i); // offsets 7, 11, 15, 19
  }


  pinMode(38, INPUT_PULLUP); // Trip 1 Reset Button
  pinMode(39, INPUT_PULLUP); // Trip 2 Reset Button
  pinMode(40, INPUT_PULLUP); // Trip 2 hafızaya yaz
}

void loop()
{


  if (gpsSerial.available() > 0)
  {
    //   GLCD.print(F("CharHeight"));
    //Serial.print(gps.encode(gpsSerial.read()));

    gps.encode(gpsSerial.read());
    if (totalGPGSVMessages.isUpdated())
    {
      for (int i = 0; i < 4; ++i)
      {
        int no = atoi(satNumber[i].value());
        // Serial.print(F("SatNumber is ")); Serial.println(no);
        if (no >= 1 && no <= MAX_SATELLITES)
        {
          sats[no - 1].elevation = atoi(elevation[i].value());
          sats[no - 1].azimuth = atoi(azimuth[i].value());
          sats[no - 1].snr = atoi(snr[i].value());
          sats[no - 1].active = true;
        }
      }


      int totalMessages = atoi(totalGPGSVMessages.value());
      int currentMessage = atoi(messageNumber.value());
      if (totalMessages == currentMessage)
      {
        Serial.print(F("Sats=")); Serial.print(gps.satellites.value());
        Serial.print(F(" Nums="));
        for (int i = 0; i < MAX_SATELLITES; ++i)
          if (sats[i].active)
          {
            Serial.print(i + 1);
            Serial.print(F(" "));
          }
        Serial.print(F(" Elevation="));
        for (int i = 0; i < MAX_SATELLITES; ++i)
          if (sats[i].active)
          {
            Serial.print(sats[i].elevation);
            Serial.print(F(" "));
          }
        Serial.print(F(" Azimuth="));
        for (int i = 0; i < MAX_SATELLITES; ++i)
          if (sats[i].active)
          {
            Serial.print(sats[i].azimuth);
            Serial.print(F(" "));
          }

        Serial.print(F(" SNR="));
        for (int i = 0; i < MAX_SATELLITES; ++i)
          if (sats[i].active)
          {
            Serial.print(sats[i].snr);
            Serial.print(F(" "));
          }
        Serial.println();

        for (int i = 0; i < MAX_SATELLITES; ++i)
          sats[i].active = false;


        delay(10);


        if (digitalRead(40) == HIGH)
        { delay(10);
          avg_speed = 0;
          t_dist1 = 0;
        }
        if (digitalRead(41) == HIGH)
        { delay(10);
          t_dist2 = 0;
        }

        delay(10);

        curr_speed = gps.speed.kmph();

        delay(10);
        lat2 = gps.location.lat();
        long2 = gps.location.lng();

        Serial.print("lat2: ");
        Serial.println(lat2);
        Serial.print("long2: ");
        Serial.println(long2);
        delay(10);
        haversine();

        Serial.println(var_d);
        delay(10);
        c_dist1 = var_d;
        c_dist2 = var_d;

        if (c_dist1 <= 2.0)
        { delay(10);
          c_dist1 = 0;
        }
        if (c_dist1 > 2.0)
        { delay(10);
          c_dist1 = var_d;
        }

        if (c_dist2 <= 2.0)
        { delay(10);
          c_dist2 = 0;
        }
        if (c_dist2 > 2.0)
        { delay(10);
          c_dist2 = var_d;
        }

        if (curr_speed <= 2.0)
        { delay(10);
          curr_speed = 0;
        }
        if (curr_speed > 2.0)
        { delay(10);
          avg_speed = (pre_speed + curr_speed) / speed_counter;
          pre_speed  = (pre_speed + curr_speed);
          kontrol = avg_speed ;
          speed_counter++;
        }


        delay(10);
        lat1 = lat2;
        long1 = long2;
        t_dist1 = t_dist1 + c_dist1;
        t_dist2 = t_dist2 + c_dist2;
        delay(10);
        GLCD.CursorTo(0, 0);
        GLCD.print("Trip1:");
        GLCD.print(t_dist1, 6);
        delay(10);
        GLCD.CursorTo(0, 1);
        GLCD.print("Trip2:");
        GLCD.print(t_dist2, 6);
        delay(10);
        GLCD.CursorTo(0, 4);
        GLCD.print("Speed:");
        GLCD.print(roundf((gps.speed.kmph()*10000.00)/10000.00), 6);
        delay(10);
        GLCD.CursorTo(0, 3);
        GLCD.print("AVG_Speed:");
        GLCD.print(avg_speed, 3);
        delay(10);
        Serial.print("Distance1:");
        Serial.println(t_dist1);
        Serial.print("Distance2:");
        Serial.println(t_dist2);
        delay(10);
        GLCD.CursorTo(0, 2);
        GLCD.print("Connected Sat:");
        GLCD.println(gps.satellites.value());
        delay(20);

        // Button 3 pushed

        /*   if (digitalRead(42) == HIGH)
            { int tripno = address ;
              EEPROM.write(address, kontrol) ;
              addresswrite = EEPROM.read(address);
              Serial.write("Older Trip" + tripno); Serial.write(":" + addresswrite);

              address++;

              if (address = 10)
              {
                address == 0 ;
              }
            } */
      }

      if (millis() > 5000 && gps.charsProcessed() < 10)
      {
        Serial.println("No GPS detected");
        while (true);
      }


    }
  }
}

Thanks for the help!

If you only want two decimal places, why did you specify six?

Wow. I really need to get a sleep. Thanks a lot