isoToCart method

Vector2 isoToCart(
  1. Vector2 p
)

Converts a coordinate from the isometric space to the cartesian space.

Implementation

Vector2 isoToCart(Vector2 p) {
  final x = p.y / scalingFactor + p.x / 2;
  final y = p.y - p.x * scalingFactor / 2;
  return Vector2(x, y);
}