public static double EndDirection(this Stroke stroke, int diffIdx) { PointSection sect = new PointSection(stroke[Math.Max(0, stroke.Count - 1 - diffIdx)].Pos, stroke[stroke.Count - 1].Pos); return(sect.Direction()); }
public static double StartDirection(this Stroke stroke, int diffIdx) { PointSection sect = new PointSection(stroke.Start.Pos, stroke[Math.Min(stroke.Count - 1, diffIdx)].Pos); return(sect.Direction()); }