fromString method

double fromString(
  1. String pixel
)

Implementation

double fromString(String pixel) {
  if (pixel == "0") {
    return 0.0;
  } else if (pixel == "1") {
    return 4.0;
  } else if (pixel == "2") {
    return 8.0;
  } else if (pixel == "3") {
    return 12.0;
  } else if (pixel == "4") {
    return 16.0;
  } else if (pixel == "5") {
    return 20.0;
  } else if (pixel == "6") {
    return 24.0;
  } else if (pixel == "7") {
    return 28.0;
  } else if (pixel == "8") {
    return 32.0;
  } else if (pixel == "9") {
    return 36.0;
  } else if (pixel == "10") {
    return 40.0;
  } else if (pixel == "11") {
    return 44.0;
  } else if (pixel == "12") {
    return 48.0;
  } else if (pixel == "14") {
    return 56.0;
  } else if (pixel == "16") {
    return 64.0;
  } else if (pixel == "20") {
    return 80.0;
  } else if (pixel == "24") {
    return 96.0;
  } else if (pixel == "28") {
    return 112.0;
  } else if (pixel == "32") {
    return 128.0;
  } else if (pixel == "36") {
    return 144.0;
  } else if (pixel == "40") {
    return 160.0;
  } else if (pixel == "44") {
    return 176.0;
  } else if (pixel == "48") {
    return 192.0;
  } else if (pixel == "52") {
    return 208.0;
  } else if (pixel == "56") {
    return 224.0;
  } else if (pixel == "60") {
    return 240.0;
  } else if (pixel == "64") {
    return 256.0;
  } else if (pixel == "72") {
    return 288.0;
  } else if (pixel == "80") {
    return 320.0;
  } else if (pixel == "96") {
    return 384.0;
  }

  return 0.0;
}