You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/// <summary>Returns true if both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal for both quantities.</summary>
756
-
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> for comparing floating-point values with rounding error tolerances.</remarks>
755
+
/// <summary>Indicates strict equality of two <see cref=""{_quantity.Name}""/> quantities, where both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal.</summary>
756
+
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> to check equality across different units and to specify a floating-point number error tolerance.</remarks>
757
+
[Obsolete(""Consider using Equals(Angle, double, ComparisonType) to check equality across different units and to specify a floating-point number error tolerance."")]
757
758
public static bool operator ==({_quantity.Name} left, {_quantity.Name} right)
758
759
{{
759
760
return left.Equals(right);
760
761
}}
761
762
762
-
/// <summary>Returns true if either <see cref=""Value"" /> or <see cref=""Unit"" /> are not exactly equal for both quantities.</summary>
763
-
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> for comparing floating-point values with rounding error tolerances.</remarks>
763
+
/// <summary>Indicates strict inequality of two <see cref=""{_quantity.Name}""/> quantities, where both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal.</summary>
764
+
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> to check equality across different units and to specify a floating-point number error tolerance.</remarks>
765
+
[Obsolete(""Consider using Equals(Angle, double, ComparisonType) to check equality across different units and to specify a floating-point number error tolerance."")]
764
766
public static bool operator !=({_quantity.Name} left, {_quantity.Name} right)
765
767
{{
766
768
return !(left == right);
767
769
}}
768
770
771
+
/// <inheritdoc />
772
+
/// <summary>Indicates strict equality of two <see cref=""{_quantity.Name}""/> quantities, where both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal.</summary>
773
+
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> to check equality across different units and to specify a floating-point number error tolerance.</remarks>
774
+
[Obsolete(""Consider using Equals(Angle, double, ComparisonType) to check equality across different units and to specify a floating-point number error tolerance."")]
775
+
public override bool Equals(object obj)
776
+
{{
777
+
if (obj is null || !(obj is {_quantity.Name} otherQuantity))
778
+
return false;
779
+
780
+
return Equals(otherQuantity);
781
+
}}
782
+
783
+
/// <inheritdoc />
784
+
/// <summary>Indicates strict equality of two <see cref=""{_quantity.Name}""/> quantities, where both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal.</summary>
785
+
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> to check equality across different units and to specify a floating-point number error tolerance.</remarks>
786
+
[Obsolete(""Consider using Equals(Angle, double, ComparisonType) to check equality across different units and to specify a floating-point number error tolerance."")]
787
+
public bool Equals({_quantity.Name} other)
788
+
{{
789
+
return new {{ Value, Unit }}.Equals(new {{ other.Value, other.Unit }});
790
+
}}
791
+
769
792
/// <summary>Compares the current <see cref=""{_quantity.Name}""/> with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other when converted to the same unit.</summary>
770
793
/// <param name=""obj"">An object to compare with this instance.</param>
/// <summary>Indicates strict equality of two <see cref=""{_quantity.Name}""/> quantities, where both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal.</summary>
807
-
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> to check equality across different units and to specify a floating-point number error tolerance.</remarks>
808
-
public override bool Equals(object obj)
809
-
{{
810
-
if (obj is null || !(obj is {_quantity.Name} otherQuantity))
811
-
return false;
812
-
813
-
return Equals(otherQuantity);
814
-
}}
815
-
816
-
/// <inheritdoc />
817
-
/// <summary>Indicates strict equality of two <see cref=""{_quantity.Name}""/> quantities, where both <see cref=""Value"" /> and <see cref=""Unit"" /> are exactly equal.</summary>
818
-
/// <remarks>Consider using <see cref=""Equals({_quantity.Name}, double, ComparisonType)""/> to check equality across different units and to specify a floating-point number error tolerance.</remarks>
819
-
public bool Equals({_quantity.Name} other)
820
-
{{
821
-
return new {{ Value, Unit }}.Equals(new {{ other.Value, other.Unit }});
822
-
}}
823
-
824
828
/// <summary>
825
829
/// <para>
826
830
/// Compare equality to another {_quantity.Name} within the given absolute or relative tolerance.
0 commit comments