mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
Fix bug in round
This commit is contained in:
parent
819a6ca890
commit
89ce755fc8
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
2
min/danmaku-converter.min.js
vendored
2
min/danmaku-converter.min.js
vendored
File diff suppressed because one or more lines are too long
@ -336,7 +336,8 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text
|
|||||||
{
|
{
|
||||||
function round(number)
|
function round(number)
|
||||||
{
|
{
|
||||||
return String(Math.round(number * 100) / 100).padStart(5, "0");
|
const [integer, decimal = "00"] = String(number).split(".");
|
||||||
|
return `${integer.padStart(2, "0")}.${decimal.substr(0, 2).padRight(2, "0")}`;
|
||||||
}
|
}
|
||||||
function secondsToTime(seconds)
|
function secondsToTime(seconds)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user