Make nearby more accurate to public server.

This commit is contained in:
SilicaAndPina 2021-02-11 11:34:47 +13:00
parent 9f592fb51b
commit 9f3ebaa256
8 changed files with 34 additions and 14 deletions

View file

@ -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