toInt method

int toInt()

Converts a boolean to an integer

Implementation

int toInt() {
  return this ? 1 : 0;
}