Table of Contents

Method AreCloseRect

Namespace
Alternet.UI
Assembly
Alternet.UI.Common.dll

AreCloseRect(RectD, RectD)

Determines whether two RectD instances are approximately equal.

public static bool AreCloseRect(RectD rect1, RectD rect2)

Parameters

rect1 RectD

The first rectangle to compare.

rect2 RectD

The second rectangle to compare.

Returns

bool

true if the two rectangles are approximately equal; otherwise, false. Rectangles are considered approximately equal if their corresponding properties (X, Y, Width, and Height) are close to each other within a small tolerance.

Remarks

If both rectangles are empty, they are considered approximately equal. If only one rectangle is empty, the method returns false.