mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-04-21 19:28:27 +08:00
refa: danmaku & feat: scroll fixed velocity (#1791)
This commit is contained in:
committed by
GitHub
parent
0a40d11133
commit
49b7ea14c3
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user