给定一个数,如果当前对象是百分比则返回给定数的百分比 否则返回当前的值
double convert(num number) { if (percent) { return number * percentRatio(); } return this.number; }