Added median method for Matrix4