Revert "change circle radius percentage calculation"

This reverts commit 99ab08db25.
This commit is contained in:
Horcrux
2016-04-27 16:49:10 +08:00
parent bf5239b796
commit f717d8bd93
8 changed files with 21 additions and 49 deletions
-5
View File
@@ -1,10 +1,5 @@
let percentReg = /^(\-?\d+(?:\.\d+)?)(%?)$/;
export default function (percent) {
let matched = percent.match(percentReg);
if (!matched) {
console.warn(`\`${percent}\` is not a valid number or percentage string.`);
return 0;
}
return matched[2] ? matched[1] / 100 : +matched[1];
}