code: private static double threePointsAngle(Point vertex, Point A, Point B) {
          double b = pointsDistance(vertex, A);
          double c = pointsDistance(A, B);
          double a = pointsDistance(B, vertex);
  
          return Math.toDegrees(Math.acos((a * a + b * b - c * c) / (2 * a * b)));
  
      }
docs: calculate the  point a's angle of rectangle consist of point a,point b, point c;
  
  @param vertex
  @param A
  @param B
  @return