// The Euclidean distance is a measure of the straight-line distance
// between two points in a 2D or 3D space
function CalculateEuclideanDistance(x1, y1, x2, y2) {
// Calculate Euclidean distance between two 2D points
return Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2));
}
const x1 = 3.0, y1 = 4.0;
const x2 = 5.0, y2 = 9.0;
const distance = CalculateEuclideanDistance(x1, y1, x2, y2);
console.log(`Euclidean Distance: ${distance.toFixed(5)}`);
/*
run:
Euclidean Distance: 5.38516
*/