Skip to content

Commit

Permalink
[Docs] Improved docs on TimeSpanRoundingPolicy
Browse files Browse the repository at this point in the history
  • Loading branch information
melanchall committed Jun 8, 2022
1 parent fb7e5ec commit 75cdbb9
Showing 1 changed file with 62 additions and 1 deletion.
63 changes: 62 additions & 1 deletion DryWetMidi/Interaction/TimeSpan/TimeSpanRoundingPolicy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,69 @@
namespace Melanchall.DryWetMidi.Interaction
{
/// <summary>
/// Specifies how a time span should be round.
/// Specifies how a time span should be rounded.
/// </summary>
/// <remarks>
/// <para>
/// The default value of the enum is <see cref="NoRounding"/>. Let's see how remaining options work.
/// Please note that rounding step should be specified (see
/// <see cref="TimeSpanUtilities.Round(ITimeSpan, TimeSpanRoundingPolicy, long, ITimeSpan, TempoMap)"/>).
/// </para>
/// <para>
/// <see cref="RoundUp"/> used to round a time span to the smallest one that is greater than or equal
/// to the time span. Following table shows how time span <see href="xref:a_ts_metric">0:0:10</see> will be
/// rounded using different steps:
/// </para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Step</term>
/// <term>Result</term>
/// </listheader>
/// <item>
/// <term>0:0:15</term>
/// <term>0:0:15</term>
/// </item>
/// <item>
/// <term>0:0:10</term>
/// <term>0:0:10</term>
/// </item>
/// <item>
/// <term>0:0:3</term>
/// <term>0:0:12</term>
/// </item>
/// </list>
/// </para>
/// <para>
/// <see cref="RoundDown"/> used to round a time span to the largest one that is less than or equal
/// to the time span. Following table shows how time span <see href="xref:a_ts_metric">0:0:10</see> will be
/// rounded using different steps:
/// </para>
/// <para>
/// <list type="table">
/// <listheader>
/// <term>Step</term>
/// <term>Result</term>
/// </listheader>
/// <item>
/// <term>0:0:3</term>
/// <term>0:0:9</term>
/// </item>
/// <item>
/// <term>0:0:10</term>
/// <term>0:0:10</term>
/// </item>
/// <item>
/// <term>0:0:6</term>
/// <term>0:0:6</term>
/// </item>
/// <item>
/// <term>0:0:15</term>
/// <term>0:0:0</term>
/// </item>
/// </list>
/// </para>
/// </remarks>
public enum TimeSpanRoundingPolicy
{
/// <summary>
Expand Down

0 comments on commit 75cdbb9

Please sign in to comment.