Class ChebyshevDistance
Represents chebyshev distance (equivalent to 8-way movement with no extra cost for diagonals).
Implements
Inherited Members
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. |