コード例 #1
0
 /// <summary>Returns an <typeparamref name="T"/> that resides at the position in time that is <paramref name="movement"/> distant from the position of <paramref name="me"/></summary>
 public static T Offset <T>(this T me, ITimeMovement movement) where T : ITimeProjectable <T>
 {
     return(me.ProjectAt(TimePoint.FromDateTime(me.TimePosition.AsDateTime() + movement.AsTimeSpan())));
 }
コード例 #2
0
ファイル: TimeMoveMent.cs プロジェクト: zuohd/Composable
 /// <summary>Returns an <see cref="ITimeMovement"/> with the same magnitude, but opposite direction.</summary>
 public static ITimeMovement Negate(this ITimeMovement me)
 {
     return(new FieldBackedTimeMovement(me.AsTimeSpan().Negate()));
 }