mirror of
https://github.com/islehorse/HISP.git
synced 2025-04-23 21:25:52 +12:00
Make nearby more accurate to public server.
This commit is contained in:
parent
9f592fb51b
commit
9f3ebaa256
8 changed files with 34 additions and 14 deletions
|
@ -1,8 +1,5 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
|
||||
namespace HISP.Server
|
||||
{
|
||||
|
@ -34,6 +31,11 @@ namespace HISP.Server
|
|||
return arr;
|
||||
}
|
||||
|
||||
public static Double PointsToDistance(int x1, int y1, int x2, int y2)
|
||||
{
|
||||
return Math.Sqrt(Math.Pow(x1 - (-y1), 2) + Math.Pow(x2 - (-y2), 2));
|
||||
}
|
||||
|
||||
public static DateTime UnixTimeStampToDateTime(double unixTimeStamp)
|
||||
{
|
||||
// Unix timestamp is seconds past epoch
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue