mirror of https://github.com/SixLabors/ImageSharp
Browse Source
Former-commit-id: 1c88a93699ffa6f2bceb33cefe86cdf631209847 Former-commit-id: a12c96eaacba895e7f3eda8dbd7fd0c5a6cf61b8 Former-commit-id: c463e27fdc0a66c5425294313642baaf6fa0959eaf/merge-core
13 changed files with 282 additions and 207 deletions
@ -0,0 +1,29 @@ |
|||
// <copyright file="IAlmostEquatable.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageProcessor |
|||
{ |
|||
using System; |
|||
|
|||
/// <summary>
|
|||
/// Defines a generalized method that a value type or class implements to create
|
|||
/// a type-specific method for determining approximate equality of instances.
|
|||
/// </summary>
|
|||
/// <typeparam name="T">The type of objects to compare.</typeparam>
|
|||
/// <typeparam name="TP">The object specifying the type to specify precision with.</typeparam>
|
|||
public interface IAlmostEquatable<T, TP> where TP : struct, IComparable<TP> |
|||
{ |
|||
/// <summary>
|
|||
/// Indicates whether the current object is equal to another object of the same type
|
|||
/// when compared to the specified precision level.
|
|||
/// </summary>
|
|||
/// <param name="other">An object to compare with this object.</param>
|
|||
/// <param name="precision">The object specifying the level of precision.</param>
|
|||
/// <returns>
|
|||
/// true if the current object is equal to the other parameter; otherwise, false.
|
|||
/// </returns>
|
|||
bool AlmostEquals(T other, TP precision); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue