title: Swift: Cannot convert return expression of type '(Int, Int)' to return type 'Int"
body: <p>I recently wrote this code in Swift below. I used structures to get a point(which is the origin) and then, the size of the rectangular. Then, a Mid structure, which calculates the centre point of the rectangular. For some reason my function calc() doesn't want to return the values which it calculates and throws an error out of nowhere:</p>
  
  <p><strong>Cannot convert return expression of type '(Int, Int)' to return type 'Int"</strong></p>
  
  <p>Does anyone know why I get an error like that?</p>
  
  <p>Swift code:</p>
  
  <pre><code>struct Point{
      var x:Int, y:Int;
  }
  
  struct Sise{
      var height:Int, width:Int;
  }
  
  struct Mid{
      var origin:Point, sise:Sise;
      func calc() -&gt; Int{
          var x = origin.x + (sise.width/2)
          var y = origin.y + (sise.height/2)
          return (x,y)
      }
  }
  
  var origin = Point(x: 0,y: 0)
  var sise = Sise(height:100, width:100)
  var result = Mid(origin:origin,sise:sise)
  result.calc()
  </code></pre>
  
  <p><strong>NOTE</strong></p>
  
  <p>English is not my first language and sorry for the grammar mistakes.</p>