Color.AreClose(Color, Color) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares two Color structures for fuzzy equality.
public:
static bool AreClose(System::Windows::Media::Color color1, System::Windows::Media::Color color2);
public static bool AreClose (System.Windows.Media.Color color1, System.Windows.Media.Color color2);
static member AreClose : System.Windows.Media.Color * System.Windows.Media.Color -> bool
Public Shared Function AreClose (color1 As Color, color2 As Color) As Boolean
Parameters
- color1
- Color
The first color to compare.
- color2
- Color
The second color to compare.
Returns
true
if color1
and color2
are nearly identical; otherwise, false
.
Remarks
This equality method compensates for the fact that floating-point values can acquire a small amount of error when operated upon.
Applies to
See also
Współpracuj z nami w serwisie GitHub
Źródło tej zawartości można znaleźć w witrynie GitHub, gdzie można również tworzyć i przeglądać problemy i żądania ściągnięcia. Więcej informacji znajdziesz w naszym przewodniku dla współtwórców.