public double parseDouble(String val) {
		if ("pi".equalsIgnoreCase(val)) {
			return Math.PI;
		}
		if ("e".equalsIgnoreCase(val)) {
			return Math.E;
		}
		try {
			return Double.valueOf(val);
		}
		catch (NumberFormatException e) {
			throw new IllegalArgumentException("Invalid double: " + val);
		}
	}
Parses a double from a string.

@param val The string to parse.
@return The double that was parsed from the string.
@throws IllegalArgumentException if the parsed value is not a valid double.
Ghidra/Features/Base/src/main/java/ghidra/app/script/GhidraScript.java