Show / Hide Table of Contents

Class ChebyshevDistance

Represents chebyshev distance (equivalent to 8-way movement with no extra cost for diagonals).

Inheritance
Object
Distance
ChebyshevDistance
Implements
IMatchable<Distance>
Inherited Members
Distance.Chebyshev
Distance.Euclidean
Distance.Manhattan
Distance.Calculate(Point, Point)
Distance.Calculate(Double, Double, Double, Double)
Distance.Calculate(Point)
Distance.GetHashCode()
Distance.Matches(Distance)
Distance.ToString()
Distance.Type
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public class ChebyshevDistance : Distance, IMatchable<Distance>
Remarks

You can't create instances of this class; instead, use Chebyshev.

Methods

Calculate(Double, Double)

Returns the distance between two locations, given the change in X and change in Y value.

Declaration
public override double Calculate(double dx, double dy)
Parameters
Type Name Description
Double dx

The delta-x between the two locations.

Double dy

The delta-y between the two locations.

Returns
Type Description
Double

The distance between two locations with the given delta-change values.

Overrides
Distance.Calculate(Double, Double)

Implements

IMatchable<T>

Extension Methods

PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>, EventHandler<ValueChangedEventArgs<TProperty>>)
In This Article
Back to top Generated by DocFX