<commit_before>#include "../include/Metric.h"
#include <iostream>

float Metric::convHectaresToAcres(float hectares)
{
    //Do not divide by zero
    if (hectares == 0) {
        hectares = hectares + 0.1;
    }
    float acres = hectares / 0.404685642;
    return acres;
}

float Metric::convKilometersToMiles(float km)
{
    float miles = km * 0.62137;
    return miles;
}

float Metric::convMetersToFeet(float meters)
{
    //Do not divide by zero
    if (meters == 0) {
        meters = meters + 0.1;
    }
    float feet = meters / 3.2808;
    return feet;
}

float Metric::convMetersToYards(float meters)
{
    float yards = meters * 1.0936;
    return yards;
}

float Metric::convCentimetersToInches(float centimenters)
{
    //Do not divide by zero
    if (centimenters == 0) {
        centimenters = centimenters + 0.1;
    }
    float inches = centimenters / 2.54;
    return inches;
}
<commit_msg>Removed magic numbers and cleaned up Metric conversions<commit_after>#include "../include/Metric.h"
#include "../include/Conversions.h"
#include <iostream>

float Metric::convHectaresToAcres(float hectares)
{
    return hectares / metrictoimp::acre;
}

float Metric::convKilometersToMiles(float km)
{
    return km * metrictoimp::mile;
}

float Metric::convMetersToFeet(float meters)
{
    return meters / metrictoimp::feet;
}

float Metric::convMetersToYards(float meters)
{
    return  meters * metrictoimp::yard;
}

float Metric::convCentimetersToInches(float centimenters)
{
    return centimenters / metrictoimp::inch;
}

{'fraction_non_alphanumeric': 0.11530944625407166, 'fraction_numerical': 0.024755700325732898, 'mean_word_length': 3.491228070175439, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2431747', 'n_tokens_mistral': 566, 'n_tokens_neox': 532, 'n_words': 125}