cos_theta#

Vector.cos_theta()[source]#

Calculate cosine of the polar angle.

Calculates \(v_z / |\vec{v}|\), corresponding to the cosine of the polar angle \(\theta\) in spherical coordinates.

Returns:
cos_thetafloat

The cosine of the polar angle within [−1, 1].