toDouble method

double toDouble()

Convert this expression to a double, requires that this expression is a Numeral.

Implementation

double toDouble() {
  if (this is Numeral) {
    return (this as Numeral).toDouble();
  } else {
    throw ArgumentError('cant be converted to double: $this');
  }
}