Nhazi n'etiti ihenhọrọ abụọ
Chọta ọ̀sọ̀ọ̀tụ̀ọ̀ n'etiti bọtịn abụọ na plane.
Nhọrọ ndị ahụ ga-akpụzi mgbe ị na-etipụta.
N'ihe banyere calculator a
This calculator finds the straight-line distance between two points (x₁, y₁) and (x₂, y₂) using the distance formula, and also reports the horizontal change (Δx), the vertical change (Δy), and the midpoint of the segment, with a plot of the two points.
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. Because the differences are squared, the order of the points does not change the result, and negative coordinates work fine.
This is the everyday tool for map distances, the length of a line segment, the magnitude of a vector, and nearest-neighbour comparisons in data. Any two points on a plane have exactly one straight-line distance between them.
Ajụjụ ndị a na-ajụkarị
Gịnị bụ fomulụ n'ebe adịgboroja?
Ọ bụ d = √((x₂ − x₁)² + (y₂ − y₁)²). N'etiti (0,0) na (3,4) n'ebe dị anya bụ √(9 + 16) = √25 = 5.
Olee otú ọ na-emetụtara Pitagoric theorem?
N'ebe dị n'akụkụ na n'ebe dị n'akụkụ na-eme ka ụkwụ abụọ nke triangle dị n'akụkụ, na n'ebe dị anya bụ ihe dị n'etiti ya na ihe dị anya - ya mere, n'ebe dị anya bụ Pythagoras na griiz.
Gịnị bụ Δx na Δy?
Ha bụ n'okporo ụzọ na n'okporo ụzọ n'etiti ihe ndị ahụ, x2 − x1 na y2 − y1 — ụkwụ abụọ nke triangle n'akụkụ n'azụ n'ebe ahụ.
Ọ bụrụ na tulee ahụ gosi ebe n'etiti?
Ee. N'ebe nso nke n'ebe ọ na-enye n'etiti, coordinate n'ebe n'etiti n'etiti ihenhọrọ abụọ ahụ.
Ọ bụrụ na usoro iheomume nke ihenhọrọ ahụ dị mkpa?
Ọ dịghị. Ụdịdị iche iche bụ squared, yabụ ịgbanwee n'etiti akara abụọ na-enye n'ebe dị iche iche.
Ọ nwere ike ijikwa n'aka n'aka coordinates?
Ee. Ọbụla n'ime coordinates n'eziokwu na-arụ ọrụ, gụnyere n'ihe na-egbochi na ndezi - n'ịgbanyekwa n'ebe ọbụla n'ebe dị nso.
API — jiri kaadị a site na kóòdù
Kpọọ kalkulata a dịka ebe ngwụcha JSON n'efu - enweghị kii achọrọ. Ziga valiu ebe ahụ n'okpuru dịka paramita ajụjụ mọọbụ JSON. Ihe ọbụla ị na-ewepụ na-eji dìfọ́ọ̀ltụ̀ nke a na-edebe ihuakwụkwọ a na ya; parameter a na-amaghị bụ 400, ọ dịghị sẽọ̀rọ̀. Gụọ ngwe ndị ahụ niile →
Ebemkpofuozi
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);
Ihe a na-ahụta bụ n'ihi nlekọta n'ozuzu ya, ọ bụghị nlekọta ego, ọgwụ ma ọ bụ nlekọta ego.