fix: Circle Transformation Miscalculation

This commit is contained in:
Syntriax 2024-11-02 09:38:01 +03:00
parent 90370a2b43
commit d7f0b76485
1 changed files with 1 additions and 1 deletions

View File

@ -69,7 +69,7 @@ public readonly struct Circle(Vector2D center, float radius)
/// Transforms the <see cref="Circle"/> by the specified <see cref="ITransform"/>. /// Transforms the <see cref="Circle"/> by the specified <see cref="ITransform"/>.
/// </summary> /// </summary>
public static Circle TransformCircle(ITransform transform, Circle circle) public static Circle TransformCircle(ITransform transform, Circle circle)
=> new(transform.TransformVector2D(circle.Center), circle.Radius * transform.Scale.Magnitude); => new(transform.TransformVector2D(circle.Center), circle.Radius * (transform.Scale.Magnitude / Vector2D.One.Magnitude));
/// <summary> /// <summary>
/// Checks if two <see cref="Circle"/>s are approximately equal. /// Checks if two <see cref="Circle"/>s are approximately equal.