Created
February 16, 2018 00:29
-
-
Save cipher982/0881f4127d70489c1a5b5ab51c4c337d to your computer and use it in GitHub Desktop.
This file contains 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
if (d > 0 && d < 4) // d represents location in meters from left-most edge | |
{ | |
car_lane = 0; // 0-4 meters = lane 0, (left-lane) | |
} | |
else if (d > 4 && d < 8) | |
{ | |
car_lane = 1; // middle-lane | |
} | |
else if (d > 8 && d < 12) | |
{ | |
car_lane = 2; // right-lane | |
} | |
if (car_lane < 0) | |
{ | |
continue; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment