calculate distance

后端 未结 3 1325
春和景丽
春和景丽 2021-01-07 15:36

i am designing a recruitment database, and i need it to perform several tasks that all involve integrating a way of calculating distance:

1) calculate the distance t

3条回答
  •  花落未央
    2021-01-07 16:14

    Just a thought: If your clients and candidates live in a very limited area, I would use a rectangular map and enter x and y values for all cities in that area in a database.

    Due to the pythagorean theorem, you can say:

    distance² = (x-value client - x-value candidate)² + (y-value client - y-value candidate)²

提交回复
热议问题