Rotate a cube to make it stand on one of its corners Kind of a theorical question here.
I would like to know how you would rotate a cube so it stands on one of its tops.
I finally managed to do it but probably not in a proper way, and as i'm curious to improve my workflow, I ask you.

Maybe there is a "mathematical" way to compute the Y angle; or even better, would there be a "blender" way to do it even more quickly ? (with snapping or something)

Thanks !
Somewhat better non-mathematical solution:


Extrude one of the side edges along the 'Z axis' and split the extrusion with Y.
Set cursor location with Shift+S and pivot point with comma.
Enable vertex snapping, set 'Edge' snap element and 'Active' snap target.
Select the main object with L and make one vertex active with Shift-Click.
Rotate in front view and side view.


That's how it looks: