         let t = transpose
         return t[0].toA() + t[1].toA() + t[2].toA()
     }
-
-}
+}
+
+extension float4 {
+    func toA() -> [Float] {
+        return [x,y,z,w]
+    }
+}
+
+extension float4x4 {
+    func toA() -> [Float] {
+        let t = transpose
+        return t[0].toA() + t[1].toA() + t[2].toA() + t[3].toA()
+    }
+    func toAA() -> [[Float]] {
+        let t = transpose
+        return [t[0].toA(), t[1].toA(), t[2].toA(), t[3].toA()]
+    }
+}
+
 
 class Quardilateral {
     let p1 : CGPoint

                    ])
                expect(adjugateViaInverse(a)) == b
            }
            
            it("should match fiddle") {
                // http://jsfiddle.net/dFrHS/3/
                let input = float3x3([0, 152, 0, 0, 0, 122, 1, 1, 1])

                        var withZ1 = float4()
                        withZ1[2] = 1
                        expect(expanded[2]) == withZ1
                    }
                }
                context("transform") {
                    it("should create 3D transformation") {
                        let expectedNormalized = normalize(expected)
                        let expanded = expandNoZ(expandNoZ(expectedNormalized))
                        let transform3D = transform(expanded)
                        expect(CATransform3DIsAffine(transform3D)) == false
                        let translate = CATransform3DMakeTranslation(100, 100, 0)
                        let scale = CATransform3DMakeScale(200.0/152, 200.0/122, 1)
                        let combined = CATransform3DConcat(translate, scale)
                        expect(CATransform3DEqualToTransform(combined, transform3D)) == false
                        let expAffine = CATransform3DGetAffineTransform(scale)
                        let affine = CATransform3DGetAffineTransform(transform3D)
//                        expect(CGAffineTransformEqualToTransform(affine, expAffine)) == true
                    }
                }
            }
