Created
July 23, 2016 15:02
-
-
Save jchernandez/d3226ba016a835f9a510775325baa7a4 to your computer and use it in GitHub Desktop.
spiral
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
double t = 0; | |
Location temp = new Location(""); | |
do { | |
double newLat = (uLocation.getLatitude() + (t * Math.cos(3 * t))); | |
double newLong = -(-uLocation.getLongitude() + (t * Math.sin(3 * t))); | |
LatLng latLng = new LatLng(newLat, newLong); | |
temp.setLatitude(newLat); | |
temp.setLongitude(newLong); | |
locations.add(latLng); | |
t = t + 0.00009; | |
}while (temp.distanceTo(uLocation)<800); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment