mirror of https://github.com/SixLabors/ImageSharp
Browse Source
Former-commit-id: 08196563e8da8dfe3435a6ea5d5f3807a0eca551 Former-commit-id: c5cd8218355a0e8f360de31ef8845048b4d7eb79 Former-commit-id: c6634395502aac589bc984097eabe5d0da6cee60pull/17/head
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