/// <summary>
 /// Rotates a given rectangle by a specific angle along a specified axis point (default (null) value is midpoint of the specified rectangle)
 /// </summary>
 /// <param name="rectangle">Rectangle to be rotated</param>
 /// <param name="angle">Angle of rotation</param>
 /// <param name="axis">Axis of rotation</param>
 /// <returns>Rectangle</returns>
 public static Rectangle2D Rotate(Rectangle2D rectangle, Angle angle, Point2D axis = null) => new Rectangle2D(rectangle.Length, rectangle.Breadth, rectangle.Midpoint = rectangle.Midpoint.Rotate(angle, axis ?? rectangle.Midpoint), rectangle.Inclination += angle);
 /// <summary>
 /// Checks whther the point lies inside a given rectangle or not
 /// </summary>
 /// <param name="rectangle">Rectangle</param>
 /// <param name="point">Point</param>
 /// <returns>bool</returns>
 public static bool PointLiesInside(Rectangle2D rectangle, Point2D point) => Math.Round(rectangle.Area, 8) == Math.Round(new Triangle2D(rectangle.A, point, rectangle.B).Area + new Triangle2D(rectangle.B, point, rectangle.C).Area + new Triangle2D(rectangle.C, point, rectangle.D).Area + new Triangle2D(rectangle.D, point, rectangle.A).Area, 8);
 /// <summary>
 /// Moves the specified rectangle object by a specified distance along a specified angle
 /// </summary>
 /// <param name="rectangle"></param>
 /// <param name="distance">distance to be moved</param>
 /// <param name="angle">angle to be moved</param>
 /// <returns>Rectangle</returns>
 public static Rectangle2D Move(Rectangle2D rectangle, double distance, Angle angle = null) => new Rectangle2D(rectangle.Length, rectangle.Breadth, rectangle.Midpoint.Move(distance, angle ?? Angle.A0), rectangle.Inclination);