Skip to content

Commit

Permalink
Merge pull request #833 from project-primera/develop
Browse files Browse the repository at this point in the history
release 0.17.3
  • Loading branch information
slime-hatena committed Apr 15, 2024
2 parents 0a1960c + 8c5832a commit f8fd128
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,19 @@
@if (array_key_exists($s->song_id . "_" . $s->difficulty, $topRankerScore))
<td class="sort_key1">{{$topRankerScore[$s->song_id . "_" . $s->difficulty] . "%"}}</td>
<td class="sort_key2">{{number_format(abs((($s->over_damage_high_score * 100) - ($topRankerScore[$s->song_id . "_" . $s->difficulty] * 100))) / 100, 2)}}%</td>
<td class="sort_key3">{{number_format(($topRankerScore[$s->song_id . "_" . $s->difficulty] != 0) ? (($s->over_damage_high_score * 100) / ($topRankerScore[$s->song_id . "_" . $s->difficulty] * 100)) * 100 : 100, 2)}}%</td>
@if ($topRankerScore[$s->song_id . "_" . $s->difficulty] == 0)
{{-- ありえなさそうだけどDIV/0対策 --}}
<td class="sort_key3">100.00%</td>
@elseif ($s->over_damage_high_score == $topRankerScore[$s->song_id . "_" . $s->difficulty])
{{-- 1位なので100%! --}}
<td class="sort_key3">100.00%</td>
@elseif ($s->over_damage_high_score == 0)
{{-- 未プレイなので0%にする --}}
<td class="sort_key3">0.00%</td>
@else
{{-- 1位ではないので計算 --}}
<td class="sort_key3">{{number_format((floor(((($s->over_damage_high_score * 100) / ($topRankerScore[$s->song_id . "_" . $s->difficulty] * 100))) * 10000) / 100), 2)}}%</td>
@endif
@else
<td class="sort_key1">?%</td>
<td class="sort_key2">?%</td>
Expand Down

0 comments on commit f8fd128

Please sign in to comment.