1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
roundval(variable, decimalplaces*) 保留小数点后几位的数值。 (Note - 运算结果将保持在字符变量中) 参数: •variable ◦变量名称. •decimalplaces (可选,不填默认为0) ◦取多少位小数位,0即为取整. 样例: roundval(val); roundval(val,2); copy(cur_hlookat,view.hlookat); mod(cur_hlookat,360); roundval(cur_hlookat,2); copy(cur_vlookat,view.vlookat); roundval(cur_vlookat,2); txtadd(msg,'looking at ',get(cur_hlookat),'/',get(cur_vlookat)); |