     var result: Array<Int> = [] // range内にあるslit
     var rest: Array<Int> = [] // range外にあるslit
     
-    for i in 0..<slits_count {
-      let slit = slit_degs[i]
+    for i in 0..<SLIT_COUNT {
+      let slit = slitDegs[i]
       if _min <= slit && slit <= _max {
         result += [i]
       }

  func updateRotation(radian: Double) {
    let current_deg = self.radiansToDegrees(radian)
    label.text = "\(floor(current_deg))"
    let passed_index = self.getSlitIndexInRange(self.prev_deg, current: current_deg)
    if 0 < passed_index.count {
      for slit_index in passed_index {
        // スクリーンのLED

  
  var players: Array<AVAudioPlayer> = []
  
  let SLIT_COUNT = 8
  var leds: Array<UIView> = []
  var prevDeg: Double = 0.0
  var slitDegs: Array<Double> = [] // 分割数に応じて360度を当分した角度を保持しておく配列
  
  override func viewDidLoad() {
    super.viewDidLoad()
    
    // 画面上のLEDの準備
    let count = Double(SLIT_COUNT)
    for i in 0..<SLIT_COUNT {
      slitDegs += [360.0/count*Double(i)]
    }
    leds = [
      led1,
