A cube,  as we all know, has the length of all its edges the same. When one needs to take out the length of a diagonal, it is very easy. All you have to do is ensure to know the correct length of the sides. Now, since the sides are all the same in length, you can use the Pythagoras theorem, because the 2 edges of the cube and a diagonal on the same face make for a right-angled triangle. This can be a very easy process with the right use of the Pythagoras theorem as well as the knowledge of the lengths of the edges.