修复中位数错误

This commit is contained in:
巴掌 committed 2020-10-28 22:54:08 +08:00
1 parent 172560019d
commit f7a586b7d9
3 files changed
+9 -9

No files matched your search

+3 -3
View File
@@ -246,15 +246,15 @@ class Tongji extends BaseModel
$zws = 0;
$cnt = count($arr);
if ($cnt = 1) {
if ($cnt === 1) {
$zws = $arr[0];
}elseif ($cnt > 1) {
$mod = $cnt % 2;
if ($mod == 0) {
if ($mod === 0) {
$i = $cnt / 2;
$zws = ($arr[$i] + $arr[$i + 1]) / 2;
}else{
$i = ($cnt + 1) / 2;
$i = ($cnt - 1) / 2;
$zws = $arr[$i];
}
}else{
+6 -6
View File
@@ -1,8 +1,8 @@
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?/$1 [QSA,PT,L]
</IfModule>
View File
Whitespace-only changes.