     init( x: Float, y: Float, z: Float, w: Float ) {
         self.v = [x,y,z,w]
     }
+    var lensq: Float {
+        return v[0] * v[0] + v[1] * v[1] + v[2] * v[2] + v[3] * v[3]
+    }
+    var length: Float {
+        return sqrt( self.lensq )
+    }
 }
 
 func dot<T:Nat>( a: Vec<T>, b: Vec<T> ) -> Float {

    init( x: Float, y: Float, z: Float ) {
        self.v = [x,y,z]
    }
}


struct Vec4: Vector {
    var count = 4
    private var v = [Float]( count: 4, repeatedValue: 0.0 )
    subscript( index: Int ) -> Float {
        get             { return v[index]     }

}

struct Vec2: Vector, SpecializedVector {
    let count = 2
    private var v = [Float]( count: 2, repeatedValue: 0.0 )
    subscript( index: Int ) -> Float {
        get             { return v[index]     }
