/// <summary> /// Returns a signed angle /// </summary> /// <param name="direction"></param> /// <param name="next"></param> /// <returns></returns> public static Angle GetSignedAngleBetween(LineSegment2 direction, Vector2 next) { var angle = next.GetAngleTo(direction.ToVector()); return angle * (direction.IsLeft(next) ? 1 : -1); }
/// <summary> /// Split the Arc at the given Point /// </summary> /// <param name="splitPoint">Point to split</param> /// <returns></returns> public IEnumerable<Arc> Split(Vector2 splitPoint) { var vstart = new Vector2(this.MiddlePoint, this.Location); var vsplit = new Vector2(this.MiddlePoint, splitPoint); return Split(vstart.GetAngleTo(vsplit)); }