given magnitude and direction