LouisAsanaka / Valorant-Zone-Stats

View your VALORANT performance in different areas of every map in the game!
MIT License
99 stars 18 forks source link

Simplify coordinate calculations #5

Closed mitchcapper closed 2 years ago

mitchcapper commented 2 years ago

Simplify how we calculate coordinates (exact same numbers obtained). Note this also is storing numbers exactly how the official game does. One non-change is the zones in our per map custom config info. Those have the Y value really at 1-y, so when we load in the zones we will just revert the 1-y there.

Top left would be 45 (so want -45 to cancel it out to 0).

Coordinates are officially: for x that is left 0 right 1 for y that is top 0 bottom 1

minus the map zones stored in the json those are y is inverted to top is 1 bottom is 0.

We don't need to re-run stats because the cached stats only stores the ingame raw coordinates.