Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
Added XML Documentation (#340)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Jul 2, 2022
1 parent 3852c10 commit 35571df
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 7 additions & 0 deletions LeoCorpLibrary.Core/Extensions/DoubleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,12 @@ public static double ToDays(this double d, TimeUnits timeUnits)
return d;
}
}

/// <summary>
/// Converts a <see cref="double"/> value to an <see cref="int"/> value.
/// </summary>
/// <param name="d">The <see cref="double"/> to convert.</param>
/// <returns>An <see cref="int"/> value.</returns>
public static int ToInt(this double d) => (int)Math.Round(d);
}
}
6 changes: 5 additions & 1 deletion LeoCorpLibrary/Extensions/DoubleExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ public static double ToDays(this double d, TimeUnits timeUnits)
}
}


/// <summary>
/// Converts a <see cref="double"/> value to an <see cref="int"/> value.
/// </summary>
/// <param name="d">The <see cref="double"/> to convert.</param>
/// <returns>An <see cref="int"/> value.</returns>
public static int ToInt(this double d) => (int)Math.Round(d);
}
}

0 comments on commit 35571df

Please sign in to comment.