offset method

MappointRelative offset(
  1. Mappoint reference
)

Creates a MappointRelative that represents the offset from a given reference point.

Implementation

MappointRelative offset(Mappoint reference) {
  return MappointRelative(x - reference.x, y - reference.y);
}