docs: updated extension methods to inherit the original method's documentation
This commit is contained in:
@@ -37,11 +37,19 @@ public readonly struct Triangle(Vector2D A, Vector2D B, Vector2D C)
|
||||
return new(center, Vector2D.Distance(center, triangle.A));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether two <see cref="Triangle"/>s are approximately equal.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Triangle"/> to compare.</param>
|
||||
/// <param name="right">The second <see cref="Triangle"/> to compare.</param>
|
||||
/// <param name="epsilon">The epsilon range.</param>
|
||||
/// <returns><c>true</c> if the <see cref="Triangle"/>s are approximately equal; otherwise, <c>false</c>.</returns>
|
||||
public static bool ApproximatelyEquals(Triangle left, Triangle right, float epsilon = float.Epsilon)
|
||||
=> left.A.ApproximatelyEquals(right.A, epsilon) && left.B.ApproximatelyEquals(right.B, epsilon) && left.C.ApproximatelyEquals(right.C, epsilon);
|
||||
}
|
||||
|
||||
public static class TriangleExtensions
|
||||
{
|
||||
/// <inheritdoc cref="Triangle.ApproximatelyEquals(Triangle, Triangle, float)" />
|
||||
public static bool ApproximatelyEquals(this Triangle left, Triangle right, float epsilon = float.Epsilon) => Triangle.ApproximatelyEquals(left, right, epsilon);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user