Skip to content

Commit

Permalink
interpolate_missing_data() typo
Browse files Browse the repository at this point in the history
  • Loading branch information
adriangibbons committed Aug 15, 2015
1 parent 3a0e552 commit fb25b27
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion php-FIT-File-Analysis.php
Original file line number Diff line number Diff line change
Expand Up @@ -938,11 +938,13 @@ private function interpolate_missing_data(&$missing_keys, &$array){
if ($missing_keys[$i] > $max_key) {
$array[$missing_keys[$i]] = $array[$max_key];
continue;
} else if ($missing_keys[$i] < $max_key) {
} else if ($missing_keys[$i] < $min_key) {
$array[$missing_keys[$i]] = $array[$min_key];
continue;
}

reset($array);

while($missing_keys[$i] > key($array)) {
$prev_value = current($array);
next($array);
Expand Down

0 comments on commit fb25b27

Please sign in to comment.