Class ManhattanDistance
Represents manhattan distance (equivalent to 4-way, cardinal-only movement).
Implements
Inherited Members
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public class ManhattanDistance : Distance, IMatchable<Distance>
Remarks
You can't create instances of this class; instead, use Manhattan.
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. |