minetest.facedir to dir

Description
Convert a facedir value to a vector, which points out of the back of a node.

6d facedir is actually defined according to the "top" vector; that can be obtained like this:

The "right" vector can then be obtained via the cross product:

See also: