mirror of
https://github.com/xivapi/ffxiv-datamining.git
synced 2026-08-02 06:48:39 +00:00
Add algorithms for converting map coordinates.
This commit is contained in:
@@ -0,0 +1,18 @@
|
|||||||
|
Conversion of a Level coordinate into a 2D map coordinate:
|
||||||
|
```csharp
|
||||||
|
private double ToMapCoordinate(double val) {
|
||||||
|
var c = Map.SizeFactor / 100.0;
|
||||||
|
|
||||||
|
val *= c;
|
||||||
|
return ((41.0 / c) * ((val + 1024.0) / 2048.0)) + 1;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
Conversion of a FishingSpot coordinate into a 2D map coordinate:
|
||||||
|
```csharp
|
||||||
|
private double ToMapCoordinate(double val) {
|
||||||
|
var c = TerritoryType.Map.SizeFactor / 100.0;
|
||||||
|
|
||||||
|
return (41.0 / c) * ((val) / 2048.0) + 1;
|
||||||
|
}
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user