normalize method

void normalize(
  1. double thickness
)

Implementation

void normalize(double thickness) {
  double l = length();
  x = x / l * thickness;
  y = y / l * thickness;
}