scaleBy method

Point<int> scaleBy(
  1. Point<int> other
)

Create a new Point where x and y values are scaled by the respective values in other.

Implementation

Point<int> scaleBy(Point<int> other) {
  return Point<int>(x * other.x, y * other.y);
}