public EndRevealingTimeline(TuneDuration tuneDuration, TimeSpan firstMark, ZeroToOne end)
        {
            this._firstMark = firstMark;
            var duration = tuneDuration.Duration();

            this._tickDuration      = new TickDuration(duration);
            this._lastThirdMarkTs   = TimeSpan.FromSeconds(duration * end);
            this._lastThirdDuration = new TickDuration(duration - this._lastThirdMarkTs.TotalSeconds);
        }
Пример #2
0
 public static ITimelineMarkingStrategy Strategy(this TimelineType type, TuneDuration tuneDuration, TimeSpan firstMark, ZeroToOne end)
 {
     return(type == TimelineType.EndRevealing
         ? (ITimelineMarkingStrategy) new EndRevealingTimeline(tuneDuration, firstMark, end)
         : new ConstantTimeline(tuneDuration, firstMark));
 }
Пример #3
0
        public static double SigmoidDerivative(this ZeroToOne input)
        {
            var sigmoid = Sigmoid(input);

            return(sigmoid * (1 - sigmoid));
        }
Пример #4
0
 public static double Sigmoid(this ZeroToOne input)
 {
     return(1d / (1d + Math.Exp(-input)));
 }
 public double PositionOnCompleteWaveform(ZeroToOne point)
 {
     return(new FiniteDouble(point) * this.CompleteWidth);
 }
 public double PositionOnRenderedWaveform(ZeroToOne point)
 {
     return(new FiniteDouble(point) * this.RenderedWidth + this.LeftMargin());
 }
Пример #7
0
 public double ActualPosition(ZeroToOne percOfCoveredArea)
 {
     return(this.StartingPoint() + percOfCoveredArea * this.Duration());
 }
Пример #8
0
 public bool Includes(ZeroToOne point)
 {
     return(point >= this.Start && point <= this.End);
 }