function _yandex_metrics_reports_round_down in Yandex.Metrics 7.2
Analog of round($val, 0, PHP_ROUND_HALF_DOWN) for PHP 5.2.
Parameters
float $val: return int
2 calls to _yandex_metrics_reports_round_down()
- yandex_metrics_reports_traffic_hourly_chart in yandex_metrics_reports/
yandex_metrics_reports.reports.inc - The function generates chart with information about hourly traffic.
- yandex_metrics_reports_visits_chart in yandex_metrics_reports/
yandex_metrics_reports.reports.inc - The function generates chart with information about page views, visitors and new visitors.
File
- yandex_metrics_reports/
yandex_metrics_reports.reports.inc, line 584 - Report callbacks for Yandex.Metrics Reports module.
Code
function _yandex_metrics_reports_round_down($val) {
if ($val * 10 % 10 <= 5) {
$val = floor($val);
}
else {
$val = ceil($val);
}
return $val;
}