Calculate X And Y Components Of Vector