Enum TimeSpanRoundingPolicy
Specifies how a time span should be rounded.
Namespace: Melanchall.DryWetMidi.Interaction
Assembly: Melanchall.DryWetMidi.dll
Syntax
public enum TimeSpanRoundingPolicy
Remarks
The default value of the enum is NoRounding. Let's see how remaining options work. Please note that rounding step should be specified (see Round(ITimeSpan, TimeSpanRoundingPolicy, long, ITimeSpan, TempoMap)).
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 0:0:10 will be rounded using different steps:
Step | Result |
---|---|
0:0:15 | 0:0:15 |
0:0:10 | 0:0:10 |
0:0:3 | 0:0:12 |
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 0:0:10 will be rounded using different steps:
Step | Result |
---|---|
0:0:3 | 0:0:9 |
0:0:10 | 0:0:10 |
0:0:6 | 0:0:6 |
0:0:15 | 0:0:0 |
Fields
Name | Description |
---|---|
NoRounding | Don't round time span. |
RoundDown | Round time span down (like, for example, Floor(double)). |
RoundUp | Round time span up (like, for example, Ceiling(double)). |