This article is a mirror article of machine translation, please click here to jump to the original article.

View: 29456|Reply: 1

[Source] .net/c# to determine if a point is in a circle

[Copy link]
Posted on 7/12/2017 3:18:49 PM | | | |

Recently, I have been working on a map project, the function of electronic fences, to judge whether the point is in the circle

Circle center coordinates {lng: 121.29947, lat: 29.573633} radius 1696.4733268003329
We added 3 points to the web page

var m1 = new BMap.Marker(new BMap.Point(121.29940,29.573600));

var m2 = new BMap.Marker(new BMap.Point(121.29940,29.579600));

var m3 = new BMap.Marker(new BMap.Point(121.29940,29.589600));

M1 and M2 are both within the circle, and M3 is clearly not in the circle

.net/C# The screenshot of the algorithm to determine whether a point is within a circle is as follows:




I translated it from Java code lol



The Marker object code is as follows:

Tourists, if you want to see the hidden content of this post, pleaseReply






Previous:Alipay app user-agent logo
Next:【Summer】Tomato Garden Ghost Win7 Summer Special Edition v201707 [32-bit & 64-bit] Full driver board
Posted on 12/13/2019 5:00:18 PM |
Market top, like one.
Disclaimer:
All software, programming materials or articles published by Code Farmer Network are only for learning and research purposes; The above content shall not be used for commercial or illegal purposes, otherwise, users shall bear all consequences. The information on this site comes from the Internet, and copyright disputes have nothing to do with this site. You must completely delete the above content from your computer within 24 hours of downloading. If you like the program, please support genuine software, purchase registration, and get better genuine services. If there is any infringement, please contact us by email.

Mail To:help@itsvse.com