diff --git a/X10D/src/Drawing/Ellipse.cs b/X10D/src/Drawing/Ellipse.cs index 911ea58..e53cc62 100644 --- a/X10D/src/Drawing/Ellipse.cs +++ b/X10D/src/Drawing/Ellipse.cs @@ -107,7 +107,7 @@ public readonly struct Ellipse : IEquatable /// if and are considered equal; otherwise, /// . /// - public static bool operator ==(Ellipse left, Ellipse right) + public static bool operator ==(in Ellipse left, in Ellipse right) { return left.Equals(right); } @@ -121,7 +121,7 @@ public readonly struct Ellipse : IEquatable /// if and are considered not equal; otherwise, /// . /// - public static bool operator !=(Ellipse left, Ellipse right) + public static bool operator !=(in Ellipse left, in Ellipse right) { return !left.Equals(right); } @@ -131,7 +131,7 @@ public readonly struct Ellipse : IEquatable /// /// The circle to convert. /// The converted ellipse. - public static implicit operator Ellipse(Circle circle) + public static implicit operator Ellipse(in Circle circle) { return new Ellipse(circle.Center, new Size(circle.Radius, circle.Radius)); } diff --git a/X10D/src/Drawing/EllipseF.cs b/X10D/src/Drawing/EllipseF.cs index d3a9d2d..0f21acf 100644 --- a/X10D/src/Drawing/EllipseF.cs +++ b/X10D/src/Drawing/EllipseF.cs @@ -135,7 +135,7 @@ public readonly struct EllipseF : IEquatable /// if and are considered equal; otherwise, /// . /// - public static bool operator ==(EllipseF left, EllipseF right) + public static bool operator ==(in EllipseF left, in EllipseF right) { return left.Equals(right); } @@ -149,7 +149,7 @@ public readonly struct EllipseF : IEquatable /// if and are considered not equal; otherwise, /// . /// - public static bool operator !=(EllipseF left, EllipseF right) + public static bool operator !=(in EllipseF left, in EllipseF right) { return !left.Equals(right); } @@ -159,7 +159,7 @@ public readonly struct EllipseF : IEquatable /// /// The circle to convert. /// The converted ellipse. - public static implicit operator EllipseF(Circle circle) + public static implicit operator EllipseF(in Circle circle) { return new EllipseF(circle.Center, new SizeF(circle.Radius, circle.Radius)); } @@ -169,7 +169,7 @@ public readonly struct EllipseF : IEquatable /// /// The circle to convert. /// The converted ellipse. - public static implicit operator EllipseF(CircleF circle) + public static implicit operator EllipseF(in CircleF circle) { return new EllipseF(circle.Center, new SizeF(circle.Radius, circle.Radius)); } @@ -179,7 +179,7 @@ public readonly struct EllipseF : IEquatable /// /// The ellipse to convert. /// The converted ellipse. - public static implicit operator EllipseF(Ellipse ellipse) + public static implicit operator EllipseF(in Ellipse ellipse) { return new EllipseF(ellipse.Center, ellipse.Radius); } @@ -189,7 +189,7 @@ public readonly struct EllipseF : IEquatable /// /// The ellipse to convert. /// The converted ellipse. - public static explicit operator Ellipse(EllipseF ellipse) + public static explicit operator Ellipse(in EllipseF ellipse) { PointF center = ellipse.Center; return new Ellipse((int)center.X, (int)center.Y, (int)ellipse.HorizontalRadius, (int)ellipse.VerticalRadius); diff --git a/X10D/src/Drawing/Line.cs b/X10D/src/Drawing/Line.cs index 8fbd726..593c670 100644 --- a/X10D/src/Drawing/Line.cs +++ b/X10D/src/Drawing/Line.cs @@ -69,15 +69,15 @@ public readonly struct Line : IEquatable, IComparable, IComparable public Point Start { get; } /// - /// Returns a value indicating whether two instances of are not equal. + /// Returns a value indicating whether two instances of are equal. /// /// The first instance. /// The second instance. /// - /// if and are considered not equal; otherwise, + /// if and are considered equal; otherwise, /// . /// - public static bool operator ==(Line left, Line right) + public static bool operator ==(in Line left, in Line right) { return left.Equals(right); } @@ -91,7 +91,7 @@ public readonly struct Line : IEquatable, IComparable, IComparable /// if and are considered not equal; otherwise, /// . /// - public static bool operator !=(Line left, Line right) + public static bool operator !=(in Line left, in Line right) { return !left.Equals(right); } @@ -105,7 +105,7 @@ public readonly struct Line : IEquatable, IComparable, IComparable /// if the of is less than that of /// ; otherwise, . /// - public static bool operator <(Line left, Line right) + public static bool operator <(in Line left, in Line right) { return left.CompareTo(right) < 0; } @@ -119,7 +119,7 @@ public readonly struct Line : IEquatable, IComparable, IComparable /// if the of is greater than that of /// ; otherwise, . /// - public static bool operator >(Line left, Line right) + public static bool operator >(in Line left, in Line right) { return left.CompareTo(right) > 0; } @@ -133,7 +133,7 @@ public readonly struct Line : IEquatable, IComparable, IComparable /// if the of is less than or equal to that of /// ; otherwise, . /// - public static bool operator <=(Line left, Line right) + public static bool operator <=(in Line left, in Line right) { return left.CompareTo(right) <= 0; } @@ -147,7 +147,7 @@ public readonly struct Line : IEquatable, IComparable, IComparable /// if the of is greater than or equal to that of /// ; otherwise, . /// - public static bool operator >=(Line left, Line right) + public static bool operator >=(in Line left, in Line right) { return left.CompareTo(right) >= 0; } diff --git a/X10D/src/Drawing/Line3D.cs b/X10D/src/Drawing/Line3D.cs index c375ed2..2f1cf04 100644 --- a/X10D/src/Drawing/Line3D.cs +++ b/X10D/src/Drawing/Line3D.cs @@ -38,7 +38,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// /// The start point. /// The end point. - public Line3D(Vector3 start, Vector3 end) + public Line3D(in Vector3 start, in Vector3 end) { End = end; Start = start; @@ -75,12 +75,12 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar public Vector3 Start { get; } /// - /// Returns a value indicating whether two instances of are not equal. + /// Returns a value indicating whether two instances of are equal. /// /// The first instance. /// The second instance. /// - /// if and are considered not equal; otherwise, + /// if and are considered equal; otherwise, /// . /// public static bool operator ==(Line3D left, Line3D right) @@ -111,7 +111,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// if the of is less than that of /// ; otherwise, . /// - public static bool operator <(Line3D left, Line3D right) + public static bool operator <(in Line3D left, in Line3D right) { return left.CompareTo(right) < 0; } @@ -125,7 +125,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// if the of is greater than that of /// ; otherwise, . /// - public static bool operator >(Line3D left, Line3D right) + public static bool operator >(in Line3D left, in Line3D right) { return left.CompareTo(right) > 0; } @@ -139,7 +139,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// if the of is less than or equal to that of /// ; otherwise, . /// - public static bool operator <=(Line3D left, Line3D right) + public static bool operator <=(in Line3D left, in Line3D right) { return left.CompareTo(right) <= 0; } @@ -153,7 +153,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// if the of is greater than or equal to that of /// ; otherwise, . /// - public static bool operator >=(Line3D left, Line3D right) + public static bool operator >=(in Line3D left, in Line3D right) { return left.CompareTo(right) >= 0; } @@ -163,7 +163,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// /// The line to convert. /// The converted line. - public static explicit operator Line(Line3D line) + public static explicit operator Line(in Line3D line) { Vector3 start = line.Start; Vector3 end = line.End; @@ -175,7 +175,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// /// The line to convert. /// The converted line. - public static explicit operator LineF(Line3D line) + public static explicit operator LineF(in Line3D line) { Vector3 start = line.Start; Vector3 end = line.End; @@ -187,7 +187,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// /// The line to convert. /// The converted line. - public static implicit operator Line3D(Line line) + public static implicit operator Line3D(in Line line) { Point start = line.Start; Point end = line.End; @@ -199,7 +199,7 @@ public readonly struct Line3D : IEquatable, IComparable, ICompar /// /// The line to convert. /// The converted line. - public static implicit operator Line3D(LineF line) + public static implicit operator Line3D(in LineF line) { PointF start = line.Start; PointF end = line.End; diff --git a/X10D/src/Drawing/LineF.cs b/X10D/src/Drawing/LineF.cs index a715a5c..9c0a62d 100644 --- a/X10D/src/Drawing/LineF.cs +++ b/X10D/src/Drawing/LineF.cs @@ -81,15 +81,15 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl public PointF Start { get; } /// - /// Returns a value indicating whether two instances of are not equal. + /// Returns a value indicating whether two instances of are equal. /// /// The first instance. /// The second instance. /// - /// if and are considered not equal; otherwise, + /// if and are considered equal; otherwise, /// . /// - public static bool operator ==(LineF left, LineF right) + public static bool operator ==(in LineF left, in LineF right) { return left.Equals(right); } @@ -103,7 +103,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// if and are considered not equal; otherwise, /// . /// - public static bool operator !=(LineF left, LineF right) + public static bool operator !=(in LineF left, in LineF right) { return !left.Equals(right); } @@ -117,7 +117,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// if the of is less than that of /// ; otherwise, . /// - public static bool operator <(LineF left, LineF right) + public static bool operator <(in LineF left, in LineF right) { return left.CompareTo(right) < 0; } @@ -131,7 +131,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// if the of is greater than that of /// ; otherwise, . /// - public static bool operator >(LineF left, LineF right) + public static bool operator >(in LineF left, in LineF right) { return left.CompareTo(right) > 0; } @@ -145,7 +145,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// if the of is less than or equal to that of /// ; otherwise, . /// - public static bool operator <=(LineF left, LineF right) + public static bool operator <=(in LineF left, in LineF right) { return left.CompareTo(right) <= 0; } @@ -159,7 +159,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// if the of is greater than or equal to that of /// ; otherwise, . /// - public static bool operator >=(LineF left, LineF right) + public static bool operator >=(in LineF left, in LineF right) { return left.CompareTo(right) >= 0; } @@ -169,7 +169,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// /// The line to convert. /// The converted line. - public static explicit operator Line(LineF line) + public static explicit operator Line(in LineF line) { PointF start = line.Start; PointF end = line.End; @@ -181,7 +181,7 @@ public readonly struct LineF : IEquatable, IComparable, IComparabl /// /// The line to convert. /// The converted line. - public static implicit operator LineF(Line line) + public static implicit operator LineF(in Line line) { return new LineF(line.Start, line.End); }