ssToGs function

Offset ssToGs(
  1. Offset ssPosition,
  2. Offset gsTopLeft,
  3. double scale
)

Convert screen space coordinates to grid space coordinates

Implementation

Offset ssToGs(Offset ssPosition, Offset gsTopLeft, double scale) {
  return ssPosition / scale + gsTopLeft;
}