Skip to contents

Calculate the direction of a vector based on its x and y components.

Usage

direction(x, y)

Arguments

x

horizontal component (numeric vector)

y

vertical component (numeric vector)

Value

the angle of the vector, in degrees clockwise from 12 o'clock