setMag method

void setMag(
  1. double mag
)

Implementation

void setMag(double mag) {
  normalize();
  scale(mag);
}