Orthog params from Projection Matrix

Hello,

Suppose I set an orthog projection :

GL.Ortho(0, 800, 800, 0, -1, 100);

I can then read back the projection matrix using:

GL.GetFloat(GetPName.ProjectionMatrix,…);

Which gives me the matrix:

(5.086263E-06, 0, 0, 0)
(0, 6.510417E-06, 0, 0)
(0, 0, 0.0003921184, 0)
(-1.043701, 0.9973958, -0.9607882, 1)

My question is, how do I get back to my “left, right, top, bottom” parameters from this matrix?

Many thanks,

James L.

Nevermind, I managed to work it out myself:

        Matrix4 matrix = new Matrix4();
        GL.GetFloat(GetPName.ProjectionMatrix, out matrix.Row0.X);

        float left =  - (1f + matrix.M41) / (matrix.M11);
        float right = (1f - matrix.M41) / (matrix.M11);

        float top = -(1 + matrix.M42) / (matrix.M22);
        float bottom = (1 - matrix.M42) / (matrix.M22);

This reference was very helpful: http://www.songho.ca/opengl/gl_projectionmatrix.html