getMouseOnCircle method

Vector2 getMouseOnCircle(
  1. num pageX,
  2. num pageY
)

Implementation

Vector2 getMouseOnCircle(num pageX, num pageY) {
  vector.setValues(
      ((pageX - scope.screen['width'] * 0.5 - scope.screen['left']) /
          (scope.screen['width'] * 0.5)),
      ((scope.screen['height'] + 2 * (scope.screen['top'] - pageY)) /
          scope.screen['width']) // screen.width intentional
      );

  return vector;
}