Search Results for

    Show / Hide Table of Contents

    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:

    StepResult
    0:0:150:0:15
    0:0:100:0:10
    0:0:30: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:

    StepResult
    0:0:30:0:9
    0:0:100:0:10
    0:0:60:0:6
    0:0:150: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)).
    In this article
    Back to top 2024 / Generated by DocFX