offset method

MappointRelative offset(
  1. double dx,
  2. double dy
)

Creates a new MappointRelative that is offset by the given dx and dy values.

Implementation

MappointRelative offset(double dx, double dy) {
  if (0 == dx && 0 == dy) {
    return this;
  }
  return MappointRelative(this.dx + dx, this.dy + dy);
}