docs: updated extension methods to inherit the original method's documentation
This commit is contained in:
@@ -72,6 +72,10 @@ public readonly struct Circle(Vector2D center, float radius)
|
||||
/// <summary>
|
||||
/// Checks if two <see cref="Circle"/>s are approximately equal.
|
||||
/// </summary>
|
||||
/// <param name="left">The first <see cref="Circle"/>.</param>
|
||||
/// <param name="right">The second <see cref="Circle"/>.</param>
|
||||
/// <param name="epsilon">The epsilon range.</param>
|
||||
/// <returns><see cref="true"/> if the <see cref="Circle"/>s are approximately equal; otherwise, <see cref="false"/>.</returns>
|
||||
public static bool ApproximatelyEquals(Circle left, Circle right, float epsilon = float.Epsilon)
|
||||
=> left.Center.ApproximatelyEquals(right.Center, epsilon) && left.Radius.ApproximatelyEquals(right.Radius, epsilon);
|
||||
}
|
||||
@@ -81,30 +85,21 @@ public readonly struct Circle(Vector2D center, float radius)
|
||||
/// </summary>
|
||||
public static class CircleExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Sets the center of the <see cref="Circle"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Circle.SetCenter(Circle, Vector2D)" />
|
||||
public static Circle SetCenter(this Circle circle, Vector2D center) => Circle.SetCenter(circle, center);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the radius of the <see cref="Circle"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Circle.SetRadius(Circle, float)" />
|
||||
public static Circle SetRadius(this Circle circle, float radius) => Circle.SetRadius(circle, radius);
|
||||
|
||||
/// <summary>
|
||||
/// Moves the <see cref="Circle"/> by the specified <see cref="Vector2D"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Circle.Displace(Circle, Vector2D)" />
|
||||
public static Circle Displace(this Circle circle, Vector2D displaceVector) => Circle.Displace(circle, displaceVector);
|
||||
|
||||
/// <summary>
|
||||
/// Projects the <see cref="Circle"/> onto the specified <see cref="Vector2D"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Circle.Project(Circle, Vector2D)" />
|
||||
public static Projection1D ToProjection(this Circle circle, Vector2D projectionVector) => Circle.Project(circle, projectionVector);
|
||||
|
||||
/// <summary>
|
||||
/// Transforms the <see cref="Circle"/> by the specified <see cref="ITransform"/>.
|
||||
/// </summary>
|
||||
/// <inheritdoc cref="Circle.TransformCircle(ITransform, Circle)" />
|
||||
public static Circle TransformCircle(this ITransform transform, Circle circle) => Circle.TransformCircle(transform, circle);
|
||||
|
||||
/// <inheritdoc cref="Circle.ApproximatelyEquals(Circle, Circle, float)" />
|
||||
public static bool ApproximatelyEquals(this Circle left, Circle right, float epsilon = float.Epsilon) => Circle.ApproximatelyEquals(left, right, epsilon);
|
||||
}
|
||||
|
Reference in New Issue
Block a user