Created
December 8, 2016 15:05
-
-
Save skorotkiewicz/99fccbf008c22bfdfca980340e53cfe2 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
<?php | |
function hot($ups, $downs, $date) { | |
$s = $ups - $downs; | |
$order = log10(max(abs($s), 1)); | |
if ($s > 0) { | |
$sign = 1; | |
} else if ($s < 0) { | |
$sign = -1; | |
} else { | |
$sign = 0; | |
} | |
$seconds = $date - time(); | |
return round($sign * $order + $seconds / 45000, 7); | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment