       for b in a + 1..<maxHarmonic {
         // Skip ratios if we've already looked at an equivalent ratio.
         // For instance, we skip 2:4 because we already looked at 1:2.
-        if (AudioAnalyzer.gcd(a, b) != 1) {
+        if AudioAnalyzer.gcd(a, b) != 1 {
           continue
         }
         let r = Double(b) / Double(a)
         let error = abs(ratio - r)
-        if (error <= 0.01) {
-          if (error < smallestError) {
+        if error <= 0.01 {
+          if error < smallestError {
             smallestError = error
             termA = a
             termB = b

  private static func gcd(_ a: Int, _ b: Int) -> Int {
    var a = a
    var b = b
    while (b > 0) {
      let temp = b
      b = a % b
      a = temp

      return roundedFrequency1 > roundedFrequency2
    }
    for (key, existingFrequencies) in sortedFundamentalFrequencies {
      if abs(key - roundedFrequency) < 10 {
        frequencies = existingFrequencies
        break
      }
    }

    if frequencies == nil {
      // No keys are close enough to roundedFrequency.
      frequencies = []
    }
