3D pythagorean theorem with values