How to see if a character is moving forward relative to it's rotation?

Sorry about that. This works for forward and backward, but how would I do this for left and right? (As in change charDirection?)