cartesian_to_polar Subroutine

public pure subroutine cartesian_to_polar(x, y, theta, r)

Convert Cartesian to polar coordinates Returns theta in [0, 2*pi) range

Arguments

Type IntentOptional Attributes Name
real(kind=wp), intent(in) :: x
real(kind=wp), intent(in) :: y
real(kind=wp), intent(out) :: theta
real(kind=wp), intent(out) :: r