refactor: optimize surplus value calculation for plan deduction

This commit is contained in:
xboard
2025-07-17 11:32:34 +08:00
parent c4834255c0
commit 4a7eef8ad6
3 changed files with 94 additions and 89 deletions

View File

@@ -211,4 +211,14 @@ class Helper
}
return $suffix;
}
/**
* convert the transfer_enable to GB
* @param int $transfer_enable
* @return int
*/
public static function transferToGB(int $transfer_enable): int
{
return $transfer_enable / 1073741824;
}
}