Mpikirakira ny halaviran'ny teboka roa
Mitadiava ny halavirana amin'ny tsipika mivantana eo amin'ny teboka roa eo amin'ny sehatra iray.
Manova ny valin'ny fanoratanao.
Momba ity kapila ity
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.
Fanontaniana matetika
Inona no fomba fanisana ny halavirana?
It is d = √((x₂ − x₁)² + (y₂ − y₁)²). Between (0,0) and (3,4) the distance is √(9 + 16) = √25 = 5.
Ahoana no ifandraisany amin'ny teôria Pythagorean?
Ny fizarazarana ny soratra dia ny fizarazarana ny soratra amin'ny soratra roa na telo, ary ny fizarazarana ny soratra amin'ny soratra telo na efatra.
Inona no atao hoe Δx sy Δy?
Ny fitambarana tokana sy ny fitambarana roa dia mizara ny toetra ara-batana sy ara-batana, ary ny fitambarana telo dia mizara ny toetra ara-batana sy ara-batana.
Mampiseho ny ivon-toeran'ny fitaovana ve?
Eny. Miaraka amin'ny halavirana omeny ny teboka afovoany, ny coordonnée dia ny antsasaky ny halavirana eo amin'ny teboka roa.
Tena zava-dehibe ve ny filaharan'ny isa?
Tsy izany. Ny fahasamihafana dia efa-jato, ka ny fifampitoviana amin'ny teboka roa dia manome ny halavirana mitovy.
Afaka mifehy ny coordonnées miiba ve izy?
Eny. Mety ny coordinate rehetra, anisan'izany ny negatify sy ny decimaly — ny famirapiratana dia mametraka ny halavirana rehetra ho positify.
API — mampiasa io milina fanisana io avy amin'ny rindran'asa
Antsoy ho toy ny farany JSON malalaka ity milina fanisana ity - tsy mila famaha. Mandefa ireo sanda eo amin'ny sehatr'asa etsy ambany ho toy ny mpizaratry ny fanontaniana na JSON. Ny zavatra tsy voalaza dia mampiasa ny sanda tsotra efa nameno ity pejy ity; 400 ny sanda tsy fantatra, tsy aotra tsy misy feo. Vakio ny tahirin-kevitra API feno →
Endpoint
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);
Ny voka-pikarohana dia natao ho an'ny torohevitra ankapobeny ihany, tsy torohevitra ara-bola, ara-pitsaboana na ara-bola.