toDisplayNumber method

String toDisplayNumber()

returns the integer conversion of double value if the magnitudes are same

Implementation

String toDisplayNumber() {
  return (toInt() == this ? toInt() : this).toString();
}