Show / Hide Table of Contents

Class ManhattanDistance

Represents manhattan distance (equivalent to 4-way, cardinal-only movement).

Inheritance
object
Distance
ManhattanDistance
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
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
[DataContract]
public class ManhattanDistance : Distance, IMatchable<Distance>
Remarks

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

Methods

View Source

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>>?)
  • View Source
In this article
Back to top Generated by DocFX