Show / Hide Table of Contents

Class BisectionResult

Structure representing the result of a rectangle bisection.

Inheritance
Object
BisectionResult
Implements
IEquatable<BisectionResult>
IMatchable<BisectionResult>
IEnumerable<Rectangle>
IEnumerable
Namespace: SadRogue.Primitives
Assembly: TheSadRogue.Primitives.dll
Syntax
public sealed class BisectionResult : ValueType, IEquatable<BisectionResult>, IMatchable<BisectionResult>, IEnumerable<Rectangle>, IEnumerable

Constructors

BisectionResult(Rectangle, Rectangle)

Constructor

Declaration
public BisectionResult(Rectangle rect1, Rectangle rect2)
Parameters
Type Name Description
Rectangle rect1

The first rectangle.

Rectangle rect2

The second rectangle.

Fields

Rect1

The first rectangle.

Declaration
public readonly Rectangle Rect1
Field Value
Type Description
Rectangle

Rect2

The second rectangle.

Declaration
public readonly Rectangle Rect2
Field Value
Type Description
Rectangle

Methods

Deconstruct(out Rectangle, out Rectangle)

Supports C# Deconstruction syntax.

Declaration
public void Deconstruct(out Rectangle rect1, out Rectangle rect2)
Parameters
Type Name Description
Rectangle rect1
Rectangle rect2

Equals(BisectionResult)

True if the given bisection result contains equivalent rectangles; false otherwise.

Declaration
public bool Equals(BisectionResult other)
Parameters
Type Name Description
BisectionResult other
Returns
Type Description
Boolean

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
Type Description
Boolean

FromTuple((Rectangle, Rectangle))

Converts the tuple to an equivalent BisectionResult.

Declaration
public static BisectionResult FromTuple((Rectangle, Rectangle) tuple)
Parameters
Type Name Description
(, )<Rectangle, Rectangle> tuple
Returns
Type Description
BisectionResult

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
Type Description
Int32

Matches(BisectionResult)

True if the given bisection result contains equivalent rectangles; false otherwise.

Declaration
public bool Matches(BisectionResult other)
Parameters
Type Name Description
BisectionResult other
Returns
Type Description
Boolean

ToEnumerable()

Obsolete.

Declaration
public IEnumerable<Rectangle> ToEnumerable()
Returns
Type Description
IEnumerable<Rectangle>

ToTuple()

Converts the pair to an equivalent tuple.

Declaration
public (Rectangle, Rectangle) ToTuple()
Returns
Type Description
(, )<Rectangle, Rectangle>

Operators

Equality(BisectionResult, BisectionResult)

True if the given results contain equivalent rectangles; false otherwise.

Declaration
public static bool operator ==(BisectionResult left, BisectionResult right)
Parameters
Type Name Description
BisectionResult left
BisectionResult right
Returns
Type Description
Boolean

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
Type Description
(, )<Rectangle, Rectangle>

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
Type Name Description
(, )<Rectangle, Rectangle> tuple

The tuple to convert to a BisectionResult.

Returns
Type Description
BisectionResult

Inequality(BisectionResult, BisectionResult)

True if the given results contain different rectangles; false otherwise.

Declaration
public static bool operator !=(BisectionResult left, BisectionResult right)
Parameters
Type Name Description
BisectionResult left
BisectionResult right
Returns
Type Description
Boolean

Implements

System.IEquatable<T>
IMatchable<T>
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable

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