refa: danmaku & feat: scroll fixed velocity (#1791)

This commit is contained in:
My-Responsitories
2025-12-29 21:03:24 +08:00
committed by GitHub
parent 0a40d11133
commit 49b7ea14c3
15 changed files with 721 additions and 770 deletions

View File

@@ -18,7 +18,7 @@ extension IntExt on int? {
extension DoubleExt on double {
double toPrecision(int fractionDigits) {
final mod = pow(10, fractionDigits.toDouble()).toDouble();
return ((this * mod).round().toDouble() / mod);
final mod = pow(10, fractionDigits).toDouble();
return (this * mod).roundToDouble() / mod;
}
}