I have headarche in converting aberration.
1. pathfindX := -(MapZonerect.Left + x * (MapZoneRect.Right - MapZoneRect.Left + 1) / MapWidth);
2. pathfindX := (Mapzonerect.Left + x) * MapWidth / (MapZoneRect.Right - MapZoneRect.Left + 1);
Is this formula incorrect?
|