두 점 사이의 거리 계산기
비행기에 두 점 사이의 직선 거리를 찾습니다.
입력하는 동안 결과가 업데이트됩니다.
이 계산기에 대해
the distance formula, d = √((x₂ − x₁)² + (y₂ − y₁)²), is simply the Pythagorean theorem applied to a grid: the horizontal and vertical gaps are the two legs of a right triangle and the distance is the hypotenuse. Between (0, 0) and (3, 4), Δx = 3 and Δy = 4, so d = √(3² + 4²) = √(9 + 16) = √25 = 5.This is the everyday tool for map distances, the length of a line segment, the magnitude of a vector, and nearest-neighbor comparisons in data. Any two points on a plane have exactly one straight-line distance between them.This is the everyday tool for map distances, the length of a line segment,
자주 묻는 질문
거리 공식은 무엇입니까?
즉, (0,0)과 (3,4) 사이의 거리는 √(9 + 16) = √25 = 5이며, (0,0)과 (3,4) 사이의 거리는 √(9 + 16) = √25 = 5이다.
어떻게 피타고라스 정리와 관련이 있습니까?
수평 및 수직 간격은 직각 삼각형의 두 다리를 형성하고, 거리는 그것의 하이포텐서입니다 - 그래서 거리 공식은 그리드에 피타고라스입니다.
Δx와 Δy는 무엇인가?
이들은 점들 사이의 수평 및 수직 차이, x2 − x1 및 y2 − y1 — 거리 뒤에 있는 직각 삼각형의 두 다리이다.
도구가 중앙점을 표시합니까?
네, 거리와 함께 중간점을 제공합니다, 두 점 사이의 정확한 중간 좌표.
포인트의 순서가 중요합니까?
차이는 제곱이므로 두 점을 교환하면 동일한 거리가 얻어집니다.
음수 좌표를 처리할 수 있습니까?
음수와 소수점을 포함한 모든 실제 좌표는 작동합니다. 제곱법은 모든 거리를 양수로 유지합니다.
API — 코드에서 이 계산기를 사용
이 계산기를 무료 JSON 엔드포인트로 호출하세요. 키가 필요하지 않습니다. 아래 필드 값을 쿼리 매개 변수 또는 JSON으로 보내십시오. 전체 API 문서 읽기 →
끝점
GET https://calculator.free/api/v1/distance-two-points/
curl
curl "https://calculator.free/api/v1/distance-two-points/?x1=0&y1=0&x2=3&y2=4"
JavaScript fetch()
const r = await fetch(
"https://calculator.free/api/v1/distance-two-points/?" + new URLSearchParams({
"x1": "0",
"y1": "0",
"x2": "3",
"y2": "4"
}));
const data = await r.json();
console.log(data.results);
결과는 재정, 의료 또는 세금 조언이 아닌 일반적인 지침을위한 추정치입니다.