Avalon.Structure.Point.IsInSightRangeByRadius C# (CSharp) Метод

IsInSightRangeByRadius() публичный статический Метод

Check if a object is in sightrange of eachother
public static IsInSightRangeByRadius ( Point A, Point B ) : bool
A Point
B Point
Результат bool
        public static bool IsInSightRangeByRadius(Point A, Point B)
        {
            double dx = (double)(A.x - B.x);
            double dy = (double)(A.y - B.y);
            double dz = (double)(A.z - B.z);
            double distance = Math.Sqrt(dx * dx + dy * dy + dz * dz);
            return distance < 5000;
        }

Same methods

Point::IsInSightRangeByRadius ( Point A, Point B, uint maxdistance ) : bool