Since the rafter tenon should not be cut cross grain, then the mortise will be inclined, to maximise strength of the beam the center of the tenons length should at the height of the neutral axis of the beam.