factorFrom method

Vec2D factorFrom(
  1. Vec2D point
)

Implementation

Vec2D factorFrom(Vec2D point) => Vec2D.fromValues(
    width == 0 ? 0 : (point.x - left) * 2 / width - 1,
    height == 0 ? 0 : (point.y - top) * 2 / height - 1);