Skip to content

Commit ea3eef9

Browse files
author
Petr Sramek
committed
updated docs for Coordinate struct
1 parent d3b9750 commit ea3eef9

File tree

1 file changed

+17
-6
lines changed

1 file changed

+17
-6
lines changed

src/PolylineAlgorithm/Coordinate.cs

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,21 @@ namespace PolylineAlgorithm;
1313
using System.Runtime.InteropServices;
1414

1515
/// <summary>
16-
/// Represents a latitude and longitude pair.
16+
/// Represents a latitude and longitude coordinate pair.
1717
/// </summary>
1818
[StructLayout(LayoutKind.Sequential, Pack = 8, Size = 16)]
1919
[DebuggerDisplay("{ToString()}")]
2020
public readonly struct Coordinate : IEquatable<Coordinate> {
2121
/// <summary>
22-
/// Initializes default instance of <see cref="Coordinate"/> with <see cref="Latitude" /> and <see cref="Longitude" /> equal to 0.
22+
/// Creates a new <see cref="Coordinate"/> structure that contains <see cref="Latitude" /> and <see cref="Longitude" /> set to 0.
2323
/// </summary>
2424
public Coordinate() {
2525
Latitude = 0d;
2626
Longitude = 0d;
2727
}
2828

2929
/// <summary>
30-
/// Initializes a new instance of <see cref="Coordinate"/> with <paramref name="latitude"/> and <paramref name="longitude"/> values.
30+
/// Creates a new <see cref="Coordinate"/> structure that contains <see cref="Latitude" /> and <see cref="Longitude" /> set to specified values.
3131
/// </summary>
3232
/// <param name="latitude">A latitude value.</param>
3333
/// <param name="longitude">A latitude value.</param>
@@ -54,7 +54,7 @@ public bool IsDefault
5454
&& Longitude == default;
5555

5656
/// <summary>
57-
/// Gets a value that indicates whether both, the <see cref="Latitude" /> and <see cref="Longitude"/> values, are in valid range.
57+
/// Gets a value that indicates whether both, the <see cref="Latitude" /> and <see cref="Longitude"/> values, are in the valid range.
5858
/// </summary>
5959
public bool IsValid
6060
=> ICoordinateValidator.Default.Latitude.IsInRange(Latitude)
@@ -98,13 +98,24 @@ public bool Equals(Coordinate other) {
9898

9999
#region Equality operators
100100

101-
/// <inheritdoc />
101+
/// <summary>
102+
/// Indicates whether the values of two specified <see cref="Coordinate" /> objects are equal.
103+
/// </summary>
104+
/// <param name="left">The first object to compare.</param>
105+
/// <param name="right">The second object to compare.</param>
106+
/// <returns><see langword="true"/> if <paramref name="left"/> and <paramref name="right"/> are equal; otherwise, <see langword="false"/>.</returns>
107+
102108
[ExcludeFromCodeCoverage]
103109
public static bool operator ==(Coordinate left, Coordinate right) {
104110
return left.Equals(right);
105111
}
106112

107-
/// <inheritdoc />
113+
/// <summary>
114+
/// Indicates whether the values of two specified <see cref="CoordinateRange" /> objects are not equal.
115+
/// </summary>
116+
/// <param name="left">The first object to compare.</param>
117+
/// <param name="right">The second object to compare.</param>
118+
/// <returns><see langword="true"/> if <paramref name="left"/> and <paramref name="right"/> are not equal; otherwise, <see langword="false"/>.</returns>
108119
[ExcludeFromCodeCoverage]
109120
public static bool operator !=(Coordinate left, Coordinate right) {
110121
return !(left == right);

0 commit comments

Comments
 (0)