Class BisectionResult
Structure representing the result of a rectangle bisection.
Inheritance
BisectionResult
Assembly: TheSadRogue.Primitives.dll
Syntax
public sealed class BisectionResult : ValueType, IEquatable<BisectionResult>, IMatchable<BisectionResult>, IEnumerable<Rectangle>, IEnumerable
Constructors
BisectionResult(Rectangle, Rectangle)
Declaration
public BisectionResult(Rectangle rect1, Rectangle rect2)
Parameters
Type |
Name |
Description |
Rectangle |
rect1 |
The first rectangle.
|
Rectangle |
rect2 |
The second rectangle.
|
Fields
Rect1
Declaration
public readonly Rectangle Rect1
Field Value
Rect2
Declaration
public readonly Rectangle Rect2
Field Value
Methods
Deconstruct(out Rectangle, out Rectangle)
Supports C# Deconstruction syntax.
Declaration
public void Deconstruct(out Rectangle rect1, out Rectangle rect2)
Parameters
Equals(BisectionResult)
True if the given bisection result contains equivalent rectangles; false otherwise.
Declaration
public bool Equals(BisectionResult other)
Parameters
Returns
Equals(Object)
True if the given object is a BisectionResult and contains equivalent rectangles; false otherwise.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
Object |
obj |
|
Returns
FromTuple((Rectangle, Rectangle))
Converts the tuple to an equivalent BisectionResult.
Declaration
public static BisectionResult FromTuple((Rectangle, Rectangle) tuple)
Parameters
Returns
GetEnumerator()
Gets an enumerator that iterates over the rectangles in this result; first Rect1, then Rect2.
Declaration
public BisectionResultEnumerator GetEnumerator()
Returns
Type |
Description |
BisectionResultEnumerator |
An enumerator that iterates over the rectangles in this result; first Rect1, then Rect2
|
GetHashCode()
Returns a hash code based on all of the rectangle's fields.
Declaration
public override int GetHashCode()
Returns
Matches(BisectionResult)
True if the given bisection result contains equivalent rectangles; false otherwise.
Declaration
public bool Matches(BisectionResult other)
Parameters
Returns
ToEnumerable()
Declaration
public IEnumerable<Rectangle> ToEnumerable()
Returns
ToTuple()
Converts the pair to an equivalent tuple.
Declaration
public (Rectangle, Rectangle) ToTuple()
Returns
Operators
Equality(BisectionResult, BisectionResult)
True if the given results contain equivalent rectangles; false otherwise.
Declaration
public static bool operator ==(BisectionResult left, BisectionResult right)
Parameters
Returns
Implicit(BisectionResult to (Rectangle, Rectangle))
Implicit conversion to an equivalent tuple.
Declaration
public static implicit operator (Rectangle, Rectangle)(BisectionResult result)
Parameters
Type |
Name |
Description |
BisectionResult |
result |
The BisectionResult to convert to a tuple.
|
Returns
Implicit((Rectangle, Rectangle) to BisectionResult)
Implicit conversion from a tuple to the equivalent bisection result.
Declaration
public static implicit operator BisectionResult((Rectangle, Rectangle) tuple)
Parameters
Returns
Inequality(BisectionResult, BisectionResult)
True if the given results contain different rectangles; false otherwise.
Declaration
public static bool operator !=(BisectionResult left, BisectionResult right)
Parameters
Returns
Implements
Extension Methods