예제 #1
0
 /// <summary>
 /// Gets the width multiplier for the specified period.
 /// Always less than or equal to 1.
 /// </summary>
 public double GetWidthMultiplier( Period period )
 {
     return _widthMultipliers[period];
 }
예제 #2
0
 /// <summary>
 /// Iterates over the specified period, executing the specified action that takes an index.
 /// </summary>
 private static void IterateOverIntervals( Period period, Action<int> action )
 {
     for ( var date = period.Start; date < period.End; date = date.AddMinutes( CollisionCheckingInterval ) )
     {
         action( (int) date.TimeOfDay.TotalMinutes / CollisionCheckingInterval );
     }
 }
예제 #3
0
 /// <summary>
 /// Gets the column in which the specified period should be put to avoid collisions.
 /// </summary>
 public int GetColumn( Period period )
 {
     return _positions[period];
 }