screenCoordsToFieldCoords

fun screenCoordsToFieldCoords(vector2d: Vector2d, canvasWidth: Double = CANVAS_WIDTH, canvasHeight: Double = CANVAS_HEIGHT): Vector2d

Converts screen coordinates to field coordinates.

Return

The field coordinates as a Vector2d object.

Parameters

vector2d

The screen coordinates as a Vector2d object.

canvasWidth

The width of the canvas.

canvasHeight

The height of the canvas.