| 3797 | } |
| 3798 | |
| 3799 | double parseInt() { |
| 3800 | String s = getFirstString(); |
| 3801 | int radix = 10; |
| 3802 | if (interp.nextToken()==',') { |
| 3803 | interp.getComma(); |
| 3804 | radix = (int)interp.getExpression(); |
| 3805 | if (radix<2||radix>36) radix = 10; |
| 3806 | } |
| 3807 | interp.getRightParen(); |
| 3808 | double n; |
| 3809 | try { |
| 3810 | if (radix==10) { |
| 3811 | n = parseDouble(s); |
| 3812 | if (!Double.isNaN(n)) n = Math.round(n); |
| 3813 | } else |
| 3814 | n = Integer.parseInt(s, radix); |
| 3815 | } catch (NumberFormatException e) { |
| 3816 | n = Double.NaN; |
| 3817 | } |
| 3818 | return n; |
| 3819 | } |
| 3820 | |
| 3821 | @AstroImageJ(reason = "Move printToWindow invocation to the render thread", modified = true) |
| 3822 | void print() { |