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); }
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)); }
public static double SigmoidDerivative(this ZeroToOne input) { var sigmoid = Sigmoid(input); return(sigmoid * (1 - sigmoid)); }
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()); }
public double ActualPosition(ZeroToOne percOfCoveredArea) { return(this.StartingPoint() + percOfCoveredArea * this.Duration()); }
public bool Includes(ZeroToOne point) { return(point >= this.Start && point <= this.End); }