 
     init(_ transform: CGAffineTransform) {
 		let t = CATransform3DMakeAffineTransform(transform)
-		self.init(m: (
-				Float(t.m11), Float(t.m12), Float(t.m13), Float(t.m14),
-				Float(t.m21), Float(t.m22), Float(t.m23), Float(t.m24),
-				Float(t.m31), Float(t.m32), Float(t.m33), Float(t.m34),
-				Float(t.m41), Float(t.m42), Float(t.m43), Float(t.m44)))
+		self.init(m: (Float(t.m11), Float(t.m12), Float(t.m13), Float(t.m14),
+		              Float(t.m21), Float(t.m22), Float(t.m23), Float(t.m24),
+		              Float(t.m31), Float(t.m32), Float(t.m33), Float(t.m34),
+		              Float(t.m41), Float(t.m42), Float(t.m43), Float(t.m44)))
 	}
 
     var scaleFactor : Float {
 		return sqrt(m00 * m00 + m01 * m01 + m02 * m02)
 	}
 
-    var invert: GLKMatrix4 {
+    var invert: GLKMatrix4? {
 		var invertible: Bool = true
 		let t = GLKMatrix4Invert(self, &invertible)
-		if !invertible { print("not invertible") }
-		return t
+        return invertible ? t : nil
 	}
 
     public var description: String {

	}

	var normalized: CGPoint {

		return self * (1.0 / length)
	}

}

extension CGPoint {

	init<X: CGFloatCovertible, Y: CGFloatCovertible>(_ x: X, _ y: Y) {
		self.x = x.cgFloatValue
		self.y = y.cgFloatValue

	}
}

extension CGRect {
	init(_ rect: Rect) {
		self.init(origin: CGPoint(rect.origin), size: CGSize(rect.size))
	}
