protected override float GetLengthKey(int key, float t0, float t1) { KeyValuePair <MultipleCurve, int> data = new KeyValuePair <MultipleCurve, int>(this, key); return(Integrate.RombergIntegral( 8, t0, t1, GetSpeedWithData, data )); }
// Length-from-time and time-from-length. public override float GetLength(float t0, float t1) { //assertion(mTMin <= t0 && t0 <= mTMax, "Invalid input\n"); //assertion(mTMin <= t1 && t1 <= mTMax, "Invalid input\n"); //assertion(t0 <= t1, "Invalid input\n"); return(Integrate.RombergIntegral( 8, t0, t1, GetSpeedWithData, this )); }