         y = sin(direction) * magnitude
     }
 
-    var magnitude : CGFloat {
+    var magnitude: CGFloat {
         get {
             return sqrt(x ** 2 + y ** 2)
         }


// MARK: dotProduct and crossProduct

public extension CGPoint {
    func dotProduct(v:CGPoint) -> CGFloat {
        return x * v.x + y * v.y
    }

    func crossProduct(v:CGPoint) -> CGFloat {
        return x * v.y - y * v.x
    }
}


        }
    }

    var square: CGFloat {
        get {
            return x ** 2 + y ** 2
        }
