#include <iostream>
#include <cmath>
#include <cassert>
using namespace std;
const double epsilon = 0.00001;
// main() calls both findDistance() and test() correctly so they don't need to be shown.
// Note: This is only a section of the full code as it is the only relevant part.

double findDistance(float x1, float y1, float x2, float y2) {
    double distanceTotal = sqrt( pow( (x2-x1),2 ) + pow( (y2-y1),2 )); // This line doesn't work with assert values.
    //double distanceTotal = (x2-x1) + (y2-y1); // This line works with assert values.
    return distanceTotal;
}

int main() {
    assert(findDistance(4, 3, 5, 1) - 2.23607 <= epsilon);
    assert(findDistance(2, 4, 2, 4) <= 1.00);
    assert(findDistance(4, 4, 4, 4) <= 1.00);
    cout << "all tests passed..." << endl;
    cout << findDistance(3, 3, 1, 1)<<endl; 
}
