angleTo method

double angleTo(
  1. LineSegment other
)

Computes the angle between this LineSegment and another one.

@param other the other LineSegment @return angle in degrees

Implementation

double angleTo(LineSegment other) {
  double angle1 = getTheta();
  double angle2 = other.getTheta();
  double angle = toDegrees(angle1 - angle2);
  return angle;
}