Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8264259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T04:23:27+00:00 2026-06-08T04:23:27+00:00

I have two points (x1,y1) and (x2,y2). I want to know whether the points

  • 0

I have two points (x1,y1) and (x2,y2). I want to know whether the points are within 5 meters of one another.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T04:23:29+00:00Added an answer on June 8, 2026 at 4:23 am

    measure the square distance from one point to the other:

    ((x1-x2)*(x1-x2)+(y1-y2)*(y1-y2)) < d*d
    

    where d is the distance, (x1,y1) are the coordinates of the ‘base point’ and (x2,y2) the coordinates of the point you want to check.

    or if you prefer:

    (Math.Pow(x1-x2,2)+Math.Pow(y1-y2,2)) < (d*d);
    

    Noticed that the preferred one does not call Pow at all for speed reasons, and the second one, probably slower, as well does not call Math.Sqrt, always for performance reasons. Maybe such optimization are premature in your case, but they are useful if that code has to be executed a lot of times.

    Of course you are talking in meters and I supposed point coordinates are expressed in meters too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two points and I want to know the line which is joining
I have two points say Source=(lat1,lon1) and destination=(lat2,lat3) I want to know which way
I have a program where I want to draw a line between two points.
I want to know the key points, which one should keep in mind while
I have two sets of three (non-collinear) points, in three dimensions. I know the
I have two points in the canvas, now I'm able to draw a line
I have two points at the end of a line. I need to get
I have two points in 3D space: a = (ax, ay, az) b =
i have two points in 3D space which have X-coordinates with different signum. so
I have two points in a cathesian 2D system, both give me the start

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.