public override LatLng Normalize() { if (IsNormalized()) { return(this); } int delta = 0; if (_lng < 0) { delta = 360 * ScaleFactorInt; } if (_lng >= 0) { delta = -360 * ScaleFactorInt; } int newLng = _lng; while (newLng <= -180 * ScaleFactorInt || newLng >= 180 * ScaleFactorInt) { newLng += delta; } var ret = new FixedLatLng(_lat, newLng) { _normalized = true }; return(ret); }
public override int GetFixedLng() { return(FixedLatLng.DoubleToFixed(_lng)); }
public override LatLng Normalize() { if (IsNormalized()) return this; int delta = 0; if (_lng < 0) delta = 360 * ScaleFactorInt; if (_lng >= 0) delta =- 360 * ScaleFactorInt; int newLng = _lng; while (newLng <= -180 * ScaleFactorInt || newLng >= 180 * ScaleFactorInt) { newLng += delta; } var ret = new FixedLatLng(_lat, newLng) { _normalized = true }; return ret; }