Created
February 21, 2020 12:18
-
-
Save oddtwelve/89e1805e49f519e08e3eafbfeed48a60 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 ($distance < 80) | |
{ | |
$d = 150; | |
} | |
elseif (in_array($distance, range(81, 120))) | |
{ | |
$d = round($distance*2.0); | |
} | |
elseif (in_array($distance, range(121, 150))) | |
{ | |
$d = round($distance*1.9); | |
} | |
elseif (in_array($distance, range(151, 200))) | |
{ | |
$d = round($distance*2.2); | |
} | |
elseif (in_array($distance, range(201, 250))) | |
{ | |
$d = round($distance*2.1); | |
} | |
elseif (in_array($distance, range(251, 300))) | |
{ | |
$d = round($distance*1.6); | |
} | |
elseif (in_array($distance, range(301, 450))) | |
{ | |
$d = round($distance*1.5); | |
} | |
elseif (in_array($distance, range(451, 600))) | |
{ | |
$d = round($distance*1.2); | |
} | |
elseif (in_array($distance, range(601, 750))) | |
{ | |
$d = round($distance*0.9); | |
} | |
elseif (in_array($distance, range(751, 800))) | |
{ | |
$d = round($distance*0.7); | |
} | |
elseif (in_array($distance, range(801, 1050))) | |
{ | |
$d = round($distance*0.8); | |
} | |
elseif (in_array($distance, range(1051, 1200))) | |
{ | |
$d = round($distance*0.7); | |
} | |
elseif (in_array($distance, range(1201, 1450))) | |
{ | |
$d = round($distance*0.6); | |
} | |
elseif (in_array($distance, range(1451, 1800))) | |
{ | |
$d = round($distance*0.5); | |
} | |
elseif (in_array($distance, range(1801, 2000))) | |
{ | |
$d = round($distance*0.6); | |
} | |
elseif (in_array($distance, range(2001, 2999))) | |
{ | |
$d = round($distance*0.5); | |
} | |
elseif ($distance > 3000) { | |
$d = round($distance * 0.4); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment