toInt method

int toInt()

Return an integer.

Implementation

int toInt() {
  switch (this) {
    case SensorType.invalid:
      return SDL_SensorType.SDL_SENSOR_INVALID;
    case SensorType.unknown:
      return SDL_SensorType.SDL_SENSOR_UNKNOWN;
    case SensorType.accel:
      return SDL_SensorType.SDL_SENSOR_ACCEL;
    case SensorType.gyro:
      return SDL_SensorType.SDL_SENSOR_GYRO;
  }
}