Spaces:
Running
Running
Jimin Huang
commited on
Commit
·
12ec108
1
Parent(s):
03e958a
Change settings
Browse files- src/views/LiveView.vue +1 -1
src/views/LiveView.vue
CHANGED
|
@@ -228,7 +228,7 @@ onBeforeUnmount(() => {
|
|
| 228 |
const asRatio = (x) => {
|
| 229 |
if (x == null || Number.isNaN(x)) return null;
|
| 230 |
// if |x| > 1.2 we assume it's already a % number (e.g., 58 or -79.23), convert to ratio
|
| 231 |
-
return Math.abs(x) > 5 ? (x / 100) : x;
|
| 232 |
};
|
| 233 |
const signedPct = (p) => {
|
| 234 |
const r = asRatio(p);
|
|
|
|
| 228 |
const asRatio = (x) => {
|
| 229 |
if (x == null || Number.isNaN(x)) return null;
|
| 230 |
// if |x| > 1.2 we assume it's already a % number (e.g., 58 or -79.23), convert to ratio
|
| 231 |
+
return Math.abs(x) > 0.5 ? (x / 100) : x;
|
| 232 |
};
|
| 233 |
const signedPct = (p) => {
|
| 234 |
const r = asRatio(p);
|