mirror of
https://github.com/oliverbooth/X10D
synced 2024-11-10 05:15:43 +00:00
Add separated argument constructor to Circle/F
This commit is contained in:
parent
b0cce087b3
commit
09393029e8
@ -15,7 +15,18 @@ public readonly struct Circle : IEquatable<Circle>, IComparable<Circle>, ICompar
|
||||
/// <summary>
|
||||
/// The unit circle. That is, a circle whose center point is (0, 0) and whose radius is 1.
|
||||
/// </summary>
|
||||
public static readonly Circle Unit = new(Point.Empty, 1);
|
||||
public static readonly Circle Unit = new(0, 0, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Circle" /> struct.
|
||||
/// </summary>
|
||||
/// <param name="centerX">The X coordinate of the center point.</param>
|
||||
/// <param name="centerY">The Y coordinate of the center point.</param>
|
||||
/// <param name="radius">The radius of the circle.</param>
|
||||
public Circle(int centerX, int centerY, int radius)
|
||||
: this(new Point(centerX, centerY), radius)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Circle" /> struct.
|
||||
|
@ -17,7 +17,18 @@ public readonly struct CircleF : IEquatable<CircleF>, IComparable<CircleF>, ICom
|
||||
/// <summary>
|
||||
/// The unit circle. That is, a circle whose center point is (0, 0) and whose radius is 1.
|
||||
/// </summary>
|
||||
public static readonly CircleF Unit = new(Vector2.Zero, 1.0f);
|
||||
public static readonly CircleF Unit = new(0f, 0f, 1.0f);
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CircleF" /> struct.
|
||||
/// </summary>
|
||||
/// <param name="centerX">The X coordinate of the center point.</param>
|
||||
/// <param name="centerY">The Y coordinate of the center point.</param>
|
||||
/// <param name="radius">The radius of the circle.</param>
|
||||
public CircleF(float centerX, float centerY, float radius)
|
||||
: this(new Vector2(centerX, centerY), radius)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="CircleF" /> struct.
|
||||
|
Loading…
Reference in New Issue
Block a user