Re: Context: I know it's not really abuse. Poor choice of words.
. Yours returns 13 on a six-sider with a six up. The answer is one. Of course, we also need a sanity check that it's an even number of sides not equal to 4 (since four sided dice are pyramid shaped).
Note: I think I am a little too into dice. :)
: the opposite face formula in the preceding post is correct at this time. I still maintain a need to sanity check whether the die has opposing face.