How to calculate middle of screen?
<p>I came cross the following code and i don't know why center of screen are calculated by using screen width divided by height ?</p>

<pre><code>class Gameplayscene: SKScene {

    var player:Player?

    var canMove=false
    var moveLeft=false

    var center:CGFloat?

    override func didMove(to view: SKView) {
        center = (self.scene?.size.width)! / (self.scene?.size.height)!

        print("the sence was loaded",center!)
    }
</code></pre>