Commit 66b70df6 by 王昆

gsb

parent d4f74063
...@@ -130,6 +130,14 @@ class System { ...@@ -130,6 +130,14 @@ class System {
return (Number(y) * 100).toFixed(0); return (Number(y) * 100).toFixed(0);
} }
static toFloat(f, digits) {
digits = digits || 2;
if (!f) {
return 0;
}
return parseFloat((Number(f)).toFixed(digits));
}
static f2y(f) { static f2y(f) {
if (!f) { if (!f) {
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment